]> xenbits.xensource.com Git - xen.git/commitdiff
VTd: Ignore HPET/IOAPIC decls in DRHD scopes
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 11 Mar 2010 08:08:32 +0000 (08:08 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 11 Mar 2010 08:08:32 +0000 (08:08 +0000)
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
xen/drivers/passthrough/vtd/dmar.c

index 1b083f7af84958db92e53d6ac50ac1f4ba03490b..859ebff37dac81fa1f4642ce96c15816eede0d66 100644 (file)
@@ -407,9 +407,15 @@ acpi_parse_one_drhd(struct acpi_dmar_entry_header *header)
     {
         u8 b, d, f;
         int i, invalid_cnt = 0;
+        void *p;
 
-        for ( i = 0; i < dmaru->scope.devices_cnt; i++ )
+        for ( i = 0, p = dev_scope_start; i < dmaru->scope.devices_cnt;
+              i++, p += ((struct acpi_dev_scope *)p)->length )
         {
+            if ( ((struct acpi_dev_scope *)p)->dev_type == ACPI_DEV_IOAPIC ||
+                 ((struct acpi_dev_scope *)p)->dev_type == ACPI_DEV_MSI_HPET )
+                continue;
+
             b = PCI_BUS(dmaru->scope.devices[i]);
             d = PCI_SLOT(dmaru->scope.devices[i]);
             f = PCI_FUNC(dmaru->scope.devices[i]);