drivers/vdpa/vdpa_user/iova_domain.h
Source file repositories/reference/linux-study-clean/drivers/vdpa/vdpa_user/iova_domain.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/vdpa/vdpa_user/iova_domain.h- Extension
.h- Size
- 2671 bytes
- Lines
- 91
- Domain
- Driver Families
- Bucket
- drivers/vdpa
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/iova.hlinux/dma-mapping.hlinux/vhost_iotlb.h
Detected Declarations
struct vduse_bounce_mapstruct vduse_iova_domain
Annotated Snippet
struct vduse_bounce_map {
struct page *bounce_page;
struct page *user_bounce_page;
u64 orig_phys;
};
struct vduse_iova_domain {
struct iova_domain stream_iovad;
struct iova_domain consistent_iovad;
struct vduse_bounce_map *bounce_maps;
size_t bounce_size;
unsigned long iova_limit;
int bounce_map;
struct vhost_iotlb *iotlb;
spinlock_t iotlb_lock;
struct file *file;
bool user_bounce_pages;
rwlock_t bounce_lock;
};
int vduse_domain_set_map(struct vduse_iova_domain *domain,
struct vhost_iotlb *iotlb);
void vduse_domain_clear_map(struct vduse_iova_domain *domain,
struct vhost_iotlb *iotlb);
void vduse_domain_sync_single_for_device(struct vduse_iova_domain *domain,
dma_addr_t dma_addr, size_t size,
enum dma_data_direction dir);
void vduse_domain_sync_single_for_cpu(struct vduse_iova_domain *domain,
dma_addr_t dma_addr, size_t size,
enum dma_data_direction dir);
dma_addr_t vduse_domain_map_page(struct vduse_iova_domain *domain,
struct page *page, unsigned long offset,
size_t size, enum dma_data_direction dir,
unsigned long attrs);
void vduse_domain_unmap_page(struct vduse_iova_domain *domain,
dma_addr_t dma_addr, size_t size,
enum dma_data_direction dir, unsigned long attrs);
dma_addr_t vduse_domain_alloc_coherent(struct vduse_iova_domain *domain,
size_t size, void *orig);
void vduse_domain_free_coherent(struct vduse_iova_domain *domain, size_t size,
dma_addr_t dma_addr, unsigned long attrs);
void vduse_domain_reset_bounce_map(struct vduse_iova_domain *domain);
int vduse_domain_add_user_bounce_pages(struct vduse_iova_domain *domain,
struct page **pages, int count);
void vduse_domain_remove_user_bounce_pages(struct vduse_iova_domain *domain);
void vduse_domain_destroy(struct vduse_iova_domain *domain);
struct vduse_iova_domain *vduse_domain_create(unsigned long iova_limit,
size_t bounce_size);
int vduse_domain_init(void);
void vduse_domain_exit(void);
#endif /* _VDUSE_IOVA_DOMAIN_H */
Annotation
- Immediate include surface: `linux/iova.h`, `linux/dma-mapping.h`, `linux/vhost_iotlb.h`.
- Detected declarations: `struct vduse_bounce_map`, `struct vduse_iova_domain`.
- Atlas domain: Driver Families / drivers/vdpa.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.