From: Keir Fraser Date: Thu, 11 Mar 2010 08:08:32 +0000 (+0000) Subject: VTd: Ignore HPET/IOAPIC decls in DRHD scopes X-Git-Tag: 4.0.0-rc7~33 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=be8c32d7eab83b0e0b48c5111777dd007b28764d;p=xen.git VTd: Ignore HPET/IOAPIC decls in DRHD scopes Signed-off-by: Alex Williamson --- diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index 1b083f7af8..859ebff37d 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -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]);