# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1265190398 0
# Node ID 0c3e4a2f14d671f40746feee02d04f2dcde8f566
# Parent 7a10f8513b3f155c4771e7f560ad69cc5deaacb0
VT-d: fix a bug in enable_ats_device
In enable_ats_device, it should enable ATS if find matched atsr unit
for a device, and don't enable it if no matched atsr unit. But current
code does contrarily. This patch fixes it.
Signed-off-by: Weidong Han <Weidong.han@xxxxxxxxx>
---
xen/drivers/passthrough/vtd/x86/ats.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff -r 7a10f8513b3f -r 0c3e4a2f14d6 xen/drivers/passthrough/vtd/x86/ats.c
--- a/xen/drivers/passthrough/vtd/x86/ats.c Wed Feb 03 09:46:01 2010 +0000
+++ b/xen/drivers/passthrough/vtd/x86/ats.c Wed Feb 03 09:46:38 2010 +0000
@@ -118,8 +118,13 @@ int enable_ats_device(int seg, int bus,
u16 queue_depth;
int pos;
- if ( acpi_find_matched_atsr_unit(bus, devfn) )
- return 0;
+ if ( !acpi_find_matched_atsr_unit(bus, devfn) )
+ {
+ dprintk(XENLOG_WARNING VTDPREFIX,
+ "cannot find matched atsr for %x:%x.%x\n",
+ bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
+ return 0;
+ }
pos = pci_find_ext_capability(seg, bus, devfn, PCI_EXT_CAP_ID_ATS);
if ( !pos )
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|