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] ioemu: fix the devices loop.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: fix the devices loop.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Jul 2008 10:30:09 -0700
Delivery-date: Thu, 17 Jul 2008 10:29:58 -0700
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 1216290001 -3600
# Node ID c9880c5a06eb7bcfca09ea9c4449da60f827283e
# Parent  cdece2b30df61497e9acbbd8710604797c366612
ioemu: fix the devices loop.

Signed-off-by: Jean Guyader <jean.guyader@xxxxxxxxxxxxx>
Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
---
 tools/ioemu/hw/pci.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff -r cdece2b30df6 -r c9880c5a06eb tools/ioemu/hw/pci.c
--- a/tools/ioemu/hw/pci.c      Thu Jul 17 11:17:32 2008 +0100
+++ b/tools/ioemu/hw/pci.c      Thu Jul 17 11:20:01 2008 +0100
@@ -644,17 +644,21 @@ PCIBus *pci_bridge_init(PCIBus *bus, int
 
 int pt_chk_bar_overlap(PCIBus *bus, int devfn, uint32_t addr, uint32_t size)
 {
-    PCIDevice *devices = (PCIDevice *)bus->devices;
+    PCIDevice *devices = NULL;
     PCIIORegion *r;
     int ret = 0;
     int i, j;
 
     /* check Overlapped to Base Address */
-    for (i=0; i<256; i++, devices++)
+    for (i=0; i<256; i++)
     {
-        if ((devices == NULL) || (devices->devfn == devfn))
+        if ( !(devices = bus->devices[i]) )
             continue;
 
+        /* skip itself */
+        if (devices->devfn == devfn)
+            continue;
+        
         for (j=0; j<PCI_NUM_REGIONS; j++)
         {
             r = &devices->io_regions[j];

_______________________________________________
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] ioemu: fix the devices loop., Xen patchbot-unstable <=