WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] VT-d: fix a bug in enable_ats_device

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] VT-d: fix a bug in enable_ats_device
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 03 Feb 2010 01:55:30 -0800
Delivery-date: Wed, 03 Feb 2010 01:57:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] VT-d: fix a bug in enable_ats_device, Xen patchbot-unstable <=