aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@Intel.com>2013-08-15 09:14:11 +0200
committerJan Beulich <jbeulich@suse.com>2013-08-15 09:14:11 +0200
commit9990231d0d5abf48574f8ec3d2464e2e3da98891 (patch)
treeec88c306eda809d938afd873e75fa7182e3d7e3e
parent28f9c24f07eb2077210c80fbb36952df1b25966b (diff)
downloadxen-9990231d0d5abf48574f8ec3d2464e2e3da98891.tar.gz
xen-9990231d0d5abf48574f8ec3d2464e2e3da98891.tar.bz2
xen-9990231d0d5abf48574f8ec3d2464e2e3da98891.zip
VTD: Remove the check for reserved device scope type
Though we only have four valid types now, the new type may be added in future. It's better to remove the check and only deal with the type that we can recognize. Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@Intel.com> Acked-by: Keir Fraser <keir@xen.org> Add log message for this case. Signed-off-by: Jan Beulich <jbeulich@suse.com> master commit: 749bc93f7a1ad47640cc7876d27641e98a08bf61 master date: 2013-04-16 10:36:05 +0200
-rw-r--r--xen/drivers/passthrough/vtd/dmar.c10
-rw-r--r--xen/include/acpi/actbl2.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index a88f46b5b3..464c14a38f 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -255,8 +255,7 @@ static int __init scope_device_count(const void *start, const void *end)
while ( start < end )
{
scope = start;
- if ( (scope->length < MIN_SCOPE_LEN) ||
- (scope->entry_type >= ACPI_DMAR_SCOPE_TYPE_RESERVED) )
+ if ( scope->length < MIN_SCOPE_LEN )
{
dprintk(XENLOG_WARNING VTDPREFIX, "Invalid device scope.\n");
return -EINVAL;
@@ -367,6 +366,13 @@ static int __init acpi_parse_dev_scope(
}
break;
+
+ default:
+ if ( iommu_verbose )
+ printk(XENLOG_WARNING VTDPREFIX "Unknown scope type %#x\n",
+ acpi_scope->entry_type);
+ start += acpi_scope->length;
+ continue;
}
scope->devices[didx++] = PCI_BDF(bus, path->dev, path->fn);
start += acpi_scope->length;
diff --git a/xen/include/acpi/actbl2.h b/xen/include/acpi/actbl2.h
index a28226ab11..87bc6b3f56 100644
--- a/xen/include/acpi/actbl2.h
+++ b/xen/include/acpi/actbl2.h
@@ -303,7 +303,6 @@ enum acpi_dmar_scope_type {
ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
ACPI_DMAR_SCOPE_TYPE_HPET = 4,
- ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
};
struct acpi_dmar_pci_path {