diff options
Diffstat (limited to 'app-emulation/virtualbox-modules/files/4.1.4-kernel-3.2-compile.patch')
-rw-r--r-- | app-emulation/virtualbox-modules/files/4.1.4-kernel-3.2-compile.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-modules/files/4.1.4-kernel-3.2-compile.patch b/app-emulation/virtualbox-modules/files/4.1.4-kernel-3.2-compile.patch new file mode 100644 index 0000000..5dcb904 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/4.1.4-kernel-3.2-compile.patch @@ -0,0 +1,44 @@ +diff -ur work.orig/vboxpci/linux/VBoxPci-linux.c work/vboxpci/linux/VBoxPci-linux.c +--- work.orig/vboxpci/linux/VBoxPci-linux.c 2011-11-08 12:00:19.358988620 -0600 ++++ work/vboxpci/linux/VBoxPci-linux.c 2011-11-08 12:02:04.248848673 -0600 +@@ -35,11 +35,19 @@ + #ifdef VBOX_WITH_IOMMU + #include <linux/dmar.h> + #include <linux/intel-iommu.h> ++#include <linux/pci.h> + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0) + # include <asm/amd_iommu.h> + #else + # include <linux/amd-iommu.h> + #endif ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0) ++#define IOMMU_PRESENT() iommu_found() ++#define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc() ++#else ++#define IOMMU_PRESENT() iommu_present(&pci_bus_type) ++#define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc(&pci_bus_type) ++#endif + #endif + + +@@ -146,7 +154,7 @@ + #endif + + #ifdef VBOX_WITH_IOMMU +- if (iommu_found()) ++ if (IOMMU_PRESENT()) + printk(KERN_INFO "vboxpci: IOMMU found\n"); + else + printk(KERN_INFO "vboxpci: IOMMU not found (not registered)\n"); +@@ -984,9 +992,9 @@ + printk(KERN_DEBUG "vboxPciOsInitVm: %p\n", pThis); + #endif + #ifdef VBOX_WITH_IOMMU +- if (iommu_found()) ++ if (IOMMU_PRESENT()) + { +- pThis->pIommuDomain = iommu_domain_alloc(); ++ pThis->pIommuDomain = IOMMU_DOMAIN_ALLOC(); + if (!pThis->pIommuDomain) + { + printk(KERN_DEBUG "cannot allocate IOMMU domain\n"); |