All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Wang2 <wei.wang2@amd.com>
To: keir.fraser@eu.citrix.com
Cc: xen-devel@lists.xensource.com
Subject: [PATCH]AMD IOV: Fix xen start up bug on non-iommu machine
Date: Mon, 21 Apr 2008 15:20:16 +0200	[thread overview]
Message-ID: <1208784016.31043.19.camel@gran.amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

Keir,
This patch fixes a Xen start up bug on non-iommu machine.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy 

[-- Attachment #2: fix_bug.patch --]
[-- Type: text/x-patch, Size: 689 bytes --]

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);
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

                 reply	other threads:[~2008-04-21 13:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1208784016.31043.19.camel@gran.amd.com \
    --to=wei.wang2@amd.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.