VirtualBox

Ticket #9743: virtbox.patch

File virtbox.patch, 1.3 KB (added by Valdis Kletnieks, 13 years ago)

Patch to allow compiles against 3.1.0 kernel

  • VBoxPci-linux.c

    old new  
    3535#ifdef VBOX_WITH_IOMMU
    3636#include <linux/dmar.h>
    3737#include <linux/intel-iommu.h>
     38#include <linux/pci.h>
    3839#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
    3940# include <asm/amd_iommu.h>
     41#define IOMMU_PRESENT() iommu_found()
     42#define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc()
    4043#else
    4144# 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)
    4247#endif
    4348#endif
    4449
    static int __init VBoxPciLinuxInit(void)  
    146151#endif
    147152
    148153#ifdef VBOX_WITH_IOMMU
    149     if (iommu_found())
     154    if (IOMMU_PRESENT())
    150155        printk(KERN_INFO "vboxpci: IOMMU found\n");
    151156    else
    152157        printk(KERN_INFO "vboxpci: IOMMU not found (not registered)\n");
    int vboxPciOsInitVm(PVBOXRAWPCIDRVVM pT  
    984989    printk(KERN_DEBUG "vboxPciOsInitVm: %p\n", pThis);
    985990#endif
    986991#ifdef VBOX_WITH_IOMMU
    987     if (iommu_found())
     992    if (IOMMU_PRESENT())
    988993    {
    989         pThis->pIommuDomain = iommu_domain_alloc();
     994        pThis->pIommuDomain = IOMMU_DOMAIN_ALLOC();
    990995        if (!pThis->pIommuDomain)
    991996        {
    992997            printk(KERN_DEBUG "cannot allocate IOMMU domain\n");

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy