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, passthrough: fix corrupting regist

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu, passthrough: fix corrupting register value in pt_pci_write_config().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 01 Aug 2008 02:20:44 -0700
Delivery-date: Fri, 01 Aug 2008 02:22:43 -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 1217580853 -3600
# Node ID 6692c3646914ee73c5d3e1792f4040c22b039a6e
# Parent  f5bb024f913572a460b2d350a30c224bb61d118e
ioemu, passthrough: fix corrupting register value in pt_pci_write_config().

I forgot to shift value read from real device. If the emulated
register offset is not aligned with 4 byte, the write emulation will
not be handled well because of corrupting register value read from
real device. The patch fixes this issue.

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

diff -r f5bb024f9135 -r 6692c3646914 tools/ioemu/hw/pass-through.c
--- a/tools/ioemu/hw/pass-through.c     Fri Aug 01 09:53:05 2008 +0100
+++ b/tools/ioemu/hw/pass-through.c     Fri Aug 01 09:54:13 2008 +0100
@@ -1101,7 +1101,8 @@ static void pt_pci_write_config(PCIDevic
     if (reg_grp_entry == NULL)
         goto out;
 
-    /* adjust the write value to appropriate CFC-CFF window */
+    /* adjust the read and write value to appropriate CFC-CFF window */
+    read_val <<= ((address & 3) << 3);
     val <<= ((address & 3) << 3);
     emul_len = len;
 

_______________________________________________
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, passthrough: fix corrupting register value in pt_pci_write_config()., Xen patchbot-unstable <=