Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/iommu/iommu_gas.c
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
/* | /* | ||||
* Guest Address Space management. | * Guest Address Space management. | ||||
*/ | */ | ||||
static uma_zone_t iommu_map_entry_zone; | static uma_zone_t iommu_map_entry_zone; | ||||
#ifdef INVARIANTS | |||||
static int iommu_check_free; | |||||
#endif | |||||
static void | static void | ||||
intel_gas_init(void) | intel_gas_init(void) | ||||
{ | { | ||||
iommu_map_entry_zone = uma_zcreate("IOMMU_MAP_ENTRY", | iommu_map_entry_zone = uma_zcreate("IOMMU_MAP_ENTRY", | ||||
sizeof(struct iommu_map_entry), NULL, NULL, | sizeof(struct iommu_map_entry), NULL, NULL, | ||||
NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NODUMP); | NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NODUMP); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 632 Lines • ▼ Show 20 Lines | iommu_map_region(struct iommu_domain *domain, struct iommu_map_entry *entry, | ||||
u_int eflags, u_int flags, vm_page_t *ma) | u_int eflags, u_int flags, vm_page_t *ma) | ||||
{ | { | ||||
int error; | int error; | ||||
error = iommu_gas_map_region(domain, entry, eflags, flags, ma); | error = iommu_gas_map_region(domain, entry, eflags, flags, ma); | ||||
return (error); | return (error); | ||||
} | } | ||||
#ifdef INVARIANTS | |||||
static SYSCTL_NODE(_hw, OID_AUTO, iommu, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, | |||||
""); | |||||
SYSCTL_INT(_hw_iommu, OID_AUTO, check_free, CTLFLAG_RWTUN, | |||||
&iommu_check_free, 0, | |||||
"Check the GPA RBtree for free_down and free_after validity"); | |||||
#endif |