From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang2 Subject: [PATCH]AMD IOV: Fix xen start up bug on non-iommu machine Date: Mon, 21 Apr 2008 15:20:16 +0200 Message-ID: <1208784016.31043.19.camel@gran.amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-QGP+wWokXgYjqeGGSf+5" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: keir.fraser@eu.citrix.com Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=-QGP+wWokXgYjqeGGSf+5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Keir, This patch fixes a Xen start up bug on non-iommu machine. Signed-off-by: Wei Wang --=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=C3=A4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=C3=A4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=C3=A4ftsf=C3=BChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy=20 --=-QGP+wWokXgYjqeGGSf+5 Content-Disposition: attachment; filename=fix_bug.patch Content-Type: text/x-patch; name=fix_bug.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r 491074885dcb xen/drivers/passthrough/amd/iommu_detect.c --- a/xen/drivers/passthrough/amd/iommu_detect.c Mon Apr 21 12:23:55 2008 +0100 +++ b/xen/drivers/passthrough/amd/iommu_detect.c Mon Apr 21 15:07:03 2008 +0200 @@ -220,9 +220,8 @@ static int __init scan_functions_for_iom func = 0; count = 1; - while ( VALID_PCI_VENDOR_ID(pci_conf_read16(bus, dev, func, - PCI_VENDOR_ID)) && - !error && (func < count) ) + while ( (func < count) && !error && + VALID_PCI_VENDOR_ID(pci_conf_read16(bus, dev, func, PCI_VENDOR_ID)) ) { hdr_type = pci_conf_read8(bus, dev, func, PCI_HEADER_TYPE); --=-QGP+wWokXgYjqeGGSf+5 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-QGP+wWokXgYjqeGGSf+5--