Ticket #9743: virtbox.patch
| File virtbox.patch, 1.3 KB (added by , 13 years ago) |
|---|
-
VBoxPci-linux.c
old new 35 35 #ifdef VBOX_WITH_IOMMU 36 36 #include <linux/dmar.h> 37 37 #include <linux/intel-iommu.h> 38 #include <linux/pci.h> 38 39 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0) 39 40 # include <asm/amd_iommu.h> 41 #define IOMMU_PRESENT() iommu_found() 42 #define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc() 40 43 #else 41 44 # include <linux/amd-iommu.h> 45 #define IOMMU_PRESENT() iommu_present(&pci_bus_type) 46 #define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc(&pci_bus_type) 42 47 #endif 43 48 #endif 44 49 … … static int __init VBoxPciLinuxInit(void) 146 151 #endif 147 152 148 153 #ifdef VBOX_WITH_IOMMU 149 if ( iommu_found())154 if (IOMMU_PRESENT()) 150 155 printk(KERN_INFO "vboxpci: IOMMU found\n"); 151 156 else 152 157 printk(KERN_INFO "vboxpci: IOMMU not found (not registered)\n"); … … int vboxPciOsInitVm(PVBOXRAWPCIDRVVM pT 984 989 printk(KERN_DEBUG "vboxPciOsInitVm: %p\n", pThis); 985 990 #endif 986 991 #ifdef VBOX_WITH_IOMMU 987 if ( iommu_found())992 if (IOMMU_PRESENT()) 988 993 { 989 pThis->pIommuDomain = iommu_domain_alloc();994 pThis->pIommuDomain = IOMMU_DOMAIN_ALLOC(); 990 995 if (!pThis->pIommuDomain) 991 996 { 992 997 printk(KERN_DEBUG "cannot allocate IOMMU domain\n");

