Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/iommu/iommu.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
typedef uint64_t iommu_haddr_t; | typedef uint64_t iommu_haddr_t; | ||||
/* Guest or bus address, before translation. */ | /* Guest or bus address, before translation. */ | ||||
typedef uint64_t iommu_gaddr_t; | typedef uint64_t iommu_gaddr_t; | ||||
struct bus_dma_tag_common; | struct bus_dma_tag_common; | ||||
struct iommu_map_entry; | struct iommu_map_entry; | ||||
TAILQ_HEAD(iommu_map_entries_tailq, iommu_map_entry); | TAILQ_HEAD(iommu_map_entries_tailq, iommu_map_entry); | ||||
RB_HEAD(iommu_gas_entries_tree, iommu_map_entry); | |||||
RB_PROTOTYPE(iommu_gas_entries_tree, iommu_map_entry, rb_entry, | |||||
iommu_gas_cmp_entries); | |||||
struct iommu_qi_genseq { | struct iommu_qi_genseq { | ||||
u_int gen; | u_int gen; | ||||
uint32_t seq; | uint32_t seq; | ||||
}; | }; | ||||
struct iommu_map_entry { | struct iommu_map_entry { | ||||
iommu_gaddr_t start; | iommu_gaddr_t start; | ||||
iommu_gaddr_t end; | iommu_gaddr_t end; | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
struct iommu_domain { | struct iommu_domain { | ||||
struct iommu_unit *iommu; /* (c) */ | struct iommu_unit *iommu; /* (c) */ | ||||
struct mtx lock; /* (c) */ | struct mtx lock; /* (c) */ | ||||
struct task unload_task; /* (c) */ | struct task unload_task; /* (c) */ | ||||
u_int entries_cnt; /* (d) */ | u_int entries_cnt; /* (d) */ | ||||
struct iommu_map_entries_tailq unload_entries; /* (d) Entries to | struct iommu_map_entries_tailq unload_entries; /* (d) Entries to | ||||
unload */ | unload */ | ||||
struct iommu_gas_entries_tree rb_root; /* (d) */ | |||||
iommu_gaddr_t end; /* (c) Highest address + 1 in | |||||
the guest AS */ | |||||
struct iommu_map_entry *first_place, *last_place; /* (d) */ | |||||
u_int flags; /* (u) */ | |||||
}; | }; | ||||
struct iommu_ctx { | struct iommu_ctx { | ||||
struct iommu_domain *domain; /* (c) */ | struct iommu_domain *domain; /* (c) */ | ||||
struct bus_dma_tag_iommu *tag; /* (c) Root tag */ | struct bus_dma_tag_iommu *tag; /* (c) Root tag */ | ||||
u_long loads; /* atomic updates, for stat only */ | u_long loads; /* atomic updates, for stat only */ | ||||
u_long unloads; /* same */ | u_long unloads; /* same */ | ||||
u_int flags; /* (u) */ | u_int flags; /* (u) */ | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |