diff -r 7e00ebe2b7fd xen/drivers/passthrough/vtd/dmar.h --- a/xen/drivers/passthrough/vtd/dmar.h Tue Jun 17 09:36:25 2008 +0100 +++ b/xen/drivers/passthrough/vtd/dmar.h Wed Jun 18 16:18:45 2008 +0800 @@ -42,28 +42,28 @@ struct acpi_ioapic_unit { struct acpi_drhd_unit { struct list_head list; - unsigned long address; /* register base address of the unit */ - struct pci_dev *devices; /* target devices */ + u64 address; /* register base address of the unit */ + struct pci_dev *devices; /* target devices */ int devices_cnt; - u8 include_all:1; + u8 include_all:1; struct iommu *iommu; struct list_head ioapic_list; }; struct acpi_rmrr_unit { struct list_head list; - unsigned long base_address; - unsigned long end_address; + u64 base_address; + u64 end_address; struct pci_dev *devices; /* target devices */ int devices_cnt; - u8 allow_all:1; + u8 allow_all:1; }; struct acpi_atsr_unit { struct list_head list; - struct pci_dev *devices; /* target devices */ + struct pci_dev *devices; /* target devices */ int devices_cnt; - u8 all_ports:1; + u8 all_ports:1; }; #define for_each_iommu(domain, iommu) \ diff -r 7e00ebe2b7fd xen/drivers/passthrough/vtd/iommu.c --- a/xen/drivers/passthrough/vtd/iommu.c Tue Jun 17 09:36:25 2008 +0100 +++ b/xen/drivers/passthrough/vtd/iommu.c Fri Jun 20 13:35:06 2008 +0800 @@ -1269,7 +1269,6 @@ static int domain_context_mapping( } static int domain_context_unmap_one( - struct domain *domain, struct iommu *iommu, u8 bus, u8 devfn) { @@ -1300,7 +1299,6 @@ static int domain_context_unmap_one( } static int domain_context_unmap( - struct domain *domain, struct iommu *iommu, struct pci_dev *pdev) { @@ -1320,14 +1318,13 @@ static int domain_context_unmap( PCI_FUNC(pdev->devfn), PCI_SUBORDINATE_BUS); break; case DEV_TYPE_PCIe_ENDPOINT: - ret = domain_context_unmap_one(domain, iommu, + ret = domain_context_unmap_one(iommu, (u8)(pdev->bus), (u8)(pdev->devfn)); break; case DEV_TYPE_PCI: if ( pdev->bus == 0 ) ret = domain_context_unmap_one( - domain, iommu, - (u8)(pdev->bus), (u8)(pdev->devfn)); + iommu, (u8)(pdev->bus), (u8)(pdev->devfn)); else { if ( bus2bridge[pdev->bus].bus != 0 ) @@ -1335,7 +1332,7 @@ static int domain_context_unmap( "domain_context_unmap:" "bus2bridge[%d].bus != 0\n", pdev->bus); - ret = domain_context_unmap_one(domain, iommu, + ret = domain_context_unmap_one(iommu, (u8)(bus2bridge[pdev->bus].bus), (u8)(bus2bridge[pdev->bus].devfn)); @@ -1345,8 +1342,7 @@ static int domain_context_unmap( for ( func = 0; func < 8; func++ ) { ret = domain_context_unmap_one( - domain, iommu, - pdev->bus, (u8)PCI_DEVFN(dev, func)); + iommu, pdev->bus, (u8)PCI_DEVFN(dev, func)); if ( ret ) return ret; } @@ -1389,7 +1385,7 @@ void reassign_device_ownership( found: drhd = acpi_find_matched_drhd_unit(pdev); iommu = drhd->iommu; - domain_context_unmap(source, iommu, pdev); + domain_context_unmap(iommu, pdev); /* Move pci device from the source domain to target domain. */ spin_lock_irqsave(&source_hd->iommu_list_lock, flags); @@ -1589,7 +1585,7 @@ static int iommu_prepare_rmrr_dev( struct pci_dev *pdev) { struct acpi_drhd_unit *drhd; - unsigned long size; + u64 size; int ret; /* page table init */