aboutsummaryrefslogtreecommitdiffstats
path: root/xen/drivers/passthrough
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@Intel.com>2013-04-16 10:36:05 +0200
committerJan Beulich <jbeulich@suse.com>2013-04-16 10:36:05 +0200
commit749bc93f7a1ad47640cc7876d27641e98a08bf61 (patch)
tree40656cd6c53c7bef820da4079397028e0ab5cb85 /xen/drivers/passthrough
parent53fd1d8458de01169dfb56feb315f02c2b521a86 (diff)
downloadxen-749bc93f7a1ad47640cc7876d27641e98a08bf61.tar.gz
xen-749bc93f7a1ad47640cc7876d27641e98a08bf61.tar.bz2
xen-749bc93f7a1ad47640cc7876d27641e98a08bf61.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>
Diffstat (limited to 'xen/drivers/passthrough')
-rw-r--r--xen/drivers/passthrough/vtd/dmar.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c
index 370d5d665e..c810dbc531 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -283,8 +283,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;
@@ -409,6 +408,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;