Changeset View
Changeset View
Standalone View
Standalone View
head/sys/amd64/vmm/io/iommu.c
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | iommu_init(void) | ||||
devclass_t dc; | devclass_t dc; | ||||
device_t dev; | device_t dev; | ||||
if (!iommu_enable) | if (!iommu_enable) | ||||
return; | return; | ||||
if (vmm_is_intel()) | if (vmm_is_intel()) | ||||
ops = &iommu_ops_intel; | ops = &iommu_ops_intel; | ||||
else if (vmm_is_amd()) | else if (vmm_is_svm()) | ||||
ops = &iommu_ops_amd; | ops = &iommu_ops_amd; | ||||
else | else | ||||
ops = NULL; | ops = NULL; | ||||
error = IOMMU_INIT(); | error = IOMMU_INIT(); | ||||
if (error) | if (error) | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 146 Lines • Show Last 20 Lines |