iommu_gaddr_t
iommu_gaddr_t end; /* (c) Highest address + 1 in
iommu_gaddr_t msi_base; /* (d) Arch-specific */
void iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start,
iommu_gaddr_t size);
const struct bus_dma_tag_common *common, iommu_gaddr_t size, int offset,
int iommu_gas_reserve_region(struct iommu_domain *domain, iommu_gaddr_t start,
iommu_gaddr_t end, struct iommu_map_entry **entry0);
iommu_gaddr_t start, iommu_gaddr_t end);
iommu_gaddr_t start;
iommu_gaddr_t end;
iommu_gaddr_t first; /* Least start in subtree */
iommu_gaddr_t last; /* Greatest end in subtree */
iommu_gaddr_t free_down; /* Max free space below the
iommu_map_msi(struct iommu_ctx *ctx, iommu_gaddr_t size, int offset,
iommu_gaddr_t bound, delta, free_down;
iommu_gaddr_t v;
iommu_gaddr_t size;
iommu_gas_match_one(struct iommu_gas_match_args *a, iommu_gaddr_t beg,
iommu_gaddr_t end, iommu_gaddr_t lbound, iommu_gaddr_t ubound)
iommu_gaddr_t first, size, start;
iommu_gas_next(struct iommu_map_entry *curr, iommu_gaddr_t min_free)
iommu_gaddr_t addr, min_free;
iommu_gas_remove_clip_left(struct iommu_domain *domain, iommu_gaddr_t start,
iommu_gaddr_t end, struct iommu_map_entry **r)
iommu_gaddr_t end, struct iommu_map_entry *entry,
iommu_gaddr_t start, iommu_gaddr_t size,
iommu_gaddr_t end;
iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start,
iommu_gaddr_t size)
const struct bus_dma_tag_common *common, iommu_gaddr_t size, int offset,
iommu_gaddr_t start;
iommu_gaddr_t start, iommu_gaddr_t end, struct iommu_map_entry *entry)
iommu_gas_reserve_region(struct iommu_domain *domain, iommu_gaddr_t start,
iommu_gaddr_t end, struct iommu_map_entry **entry0)
iommu_gaddr_t start, iommu_gaddr_t end)
iommu_gaddr_t entry_start, entry_end;
int iommu_map_msi(struct iommu_ctx *ctx, iommu_gaddr_t size, int offset,
amdiommu_qi_invalidate_emit(struct iommu_domain *adomain, iommu_gaddr_t base,
iommu_gaddr_t size, struct iommu_qi_genseq *pseq, bool emit_wait)
static iommu_gaddr_t
iommu_gaddr_t end;
amdiommu_pgtbl_map_pte(struct amdiommu_domain *domain, iommu_gaddr_t base,
amdiommu_map_buf_locked(struct amdiommu_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags,
iommu_gaddr_t base1;
iommu_gaddr_t base, size;
amdiommu_free_pgtbl_pde(struct amdiommu_domain *domain, iommu_gaddr_t base,
amdiommu_unmap_clear_pte(struct amdiommu_domain *domain, iommu_gaddr_t base,
amdiommu_unmap_buf_locked(struct amdiommu_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size, int flags, struct iommu_map_entry *entry)
iommu_gaddr_t pg_sz;
iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte,
iommu_gaddr_t base, iommu_gaddr_t size, int flags,
iommu_gaddr_t start, end;
int dmar_maxaddr2mgaw(struct dmar_unit *unit, iommu_gaddr_t maxaddr,
iommu_gaddr_t domain_page_size(struct dmar_domain *domain, int lvl);
int calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size,
iommu_gaddr_t *isizep);
void dmar_qi_invalidate_sync(struct dmar_domain *domain, iommu_gaddr_t start,
iommu_gaddr_t size, bool cansleep);
iommu_gaddr_t maxaddr);
void dmar_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size);
iommu_gaddr_t addr)
iommu_gaddr_t f, pg_sz;
dmar_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr)
dmar_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl,
dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags,
iommu_gaddr_t pg_sz, base1;
iommu_gaddr_t base, size;
iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte,
dmar_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base,
dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl,
dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size, int flags, struct iommu_map_entry *entry)
iommu_gaddr_t pg_sz;
iommu_gaddr_t base, iommu_gaddr_t size, int flags,
dmar_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size)
iommu_gaddr_t isize;
iommu_gaddr_t maxaddr; /* Page table covers the guest address
dmar_qi_invalidate_emit(struct iommu_domain *idomain, iommu_gaddr_t base,
iommu_gaddr_t size, struct iommu_qi_genseq *pseq, bool emit_wait)
iommu_gaddr_t isize;
dmar_maxaddr2mgaw(struct dmar_unit *unit, iommu_gaddr_t maxaddr, bool allow_less)
iommu_gaddr_t
calc_am(struct dmar_unit *unit, iommu_gaddr_t base, iommu_gaddr_t size,
iommu_gaddr_t *isizep)
iommu_gaddr_t isize;
iommu_qi_invalidate_sync(struct iommu_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size, bool cansleep)
pglvl_pgtbl_pte_off(int pglvl, iommu_gaddr_t base, int lvl)
pglvl_pgtbl_get_pindex(int pglvl, iommu_gaddr_t base, int lvl)
iommu_gaddr_t
static const iommu_gaddr_t pg_sz[] = {
(iommu_gaddr_t)IOMMU_PAGE_SIZE,
(iommu_gaddr_t)IOMMU_PAGE_SIZE << IOMMU_NPTEPGSHIFT,
(iommu_gaddr_t)IOMMU_PAGE_SIZE << (2 * IOMMU_NPTEPGSHIFT),
(iommu_gaddr_t)IOMMU_PAGE_SIZE << (3 * IOMMU_NPTEPGSHIFT),
(iommu_gaddr_t)IOMMU_PAGE_SIZE << (4 * IOMMU_NPTEPGSHIFT),
(iommu_gaddr_t)IOMMU_PAGE_SIZE << (5 * IOMMU_NPTEPGSHIFT),
(iommu_gaddr_t)IOMMU_PAGE_SIZE << (6 * IOMMU_NPTEPGSHIFT),
void iommu_qi_invalidate_sync(struct iommu_domain *domain, iommu_gaddr_t base,
iommu_gaddr_t size, bool cansleep);
int pglvl_pgtbl_pte_off(int pglvl, iommu_gaddr_t base, int lvl);
vm_pindex_t pglvl_pgtbl_get_pindex(int pglvl, iommu_gaddr_t base, int lvl);
iommu_gaddr_t pglvl_page_size(int total_pglvl, int lvl);
iommu_gaddr_t base, iommu_gaddr_t size, struct iommu_qi_genseq *