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 libpci error handling.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: fix libpci error handling.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 01 Aug 2008 02:20:43 -0700
Delivery-date: Fri, 01 Aug 2008 02:22:38 -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 1217580785 -3600
# Node ID f5bb024f913572a460b2d350a30c224bb61d118e
# Parent  8d1c146fd8429c753b54457bcd6b17561f9bb902
ioemu: fix libpci error handling.

libpci returns ALL F when error occurs. Currently, if libpci returns
ALL F, emulation stops. But it is possible that the field of real register
which is read by guest software is ALL F.

After applying this patch, if libpci returns ALL F, ioemu will log
warning message and continue the emulation.

Signed-off-by: Yuji Shimada <shimada-yxb@xxxxxxxxxxxxxxx>
---
 tools/ioemu/hw/pass-through.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff -r 8d1c146fd842 -r f5bb024f9135 tools/ioemu/hw/pass-through.c
--- a/tools/ioemu/hw/pass-through.c     Fri Aug 01 09:52:22 2008 +0100
+++ b/tools/ioemu/hw/pass-through.c     Fri Aug 01 09:53:05 2008 +0100
@@ -1087,15 +1087,14 @@ static void pt_pci_write_config(PCIDevic
         break;
     }
 
-    /* check libpci error */
+    /* check libpci result */
     valid_mask = (0xFFFFFFFF >> ((4 - len) << 3));
     if ((read_val & valid_mask) == valid_mask)
     {
-        PT_LOG("libpci read error. No emulation. "
+        PT_LOG("Warning: Return ALL F from libpci read. "
             "[%02x:%02x.%x][Offset:%02xh][Length:%d]\n",
             pci_bus_num(d->bus), ((d->devfn >> 3) & 0x1F), (d->devfn & 0x7),
             address, len);
-        goto exit;
     }
     
     /* pass directly to libpci for passthrough type register group */
@@ -1264,15 +1263,14 @@ static uint32_t pt_pci_read_config(PCIDe
         break;
     }
 
-    /* check libpci error */
+    /* check libpci result */
     valid_mask = (0xFFFFFFFF >> ((4 - len) << 3));
     if ((val & valid_mask) == valid_mask)
     {
-        PT_LOG("libpci read error. No emulation. "
+        PT_LOG("Warning: Return ALL F from libpci read. "
             "[%02x:%02x.%x][Offset:%02xh][Length:%d]\n",
             pci_bus_num(d->bus), ((d->devfn >> 3) & 0x1F), (d->devfn & 0x7),
             address, len);
-        goto exit;
     }
 
     /* just return the I/O device register value for 

_______________________________________________
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 libpci error handling., Xen patchbot-unstable <=