[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-4.1-testing] x86/PCI: fix guest_io_read() when pci_cfg_ok() denies access


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Mon, 09 Jul 2012 15:33:12 +0000
  • Delivery-date: Mon, 09 Jul 2012 15:33:27 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1341826244 -3600
# Node ID 3ce155e77f39d0c3cc787c1cc3d6bab1ef45a1dc
# Parent  ff523faf2be10a86b4f1452533db2271e0d88ff3
x86/PCI: fix guest_io_read() when pci_cfg_ok() denies access

For a multi-byte aligned read, this so far resulted in 0x00ff to be
put in the guest's register rather than 0xffff or 0xffffffff, which in
turn could confuse bus scanning functions (which, when reading vendor
and/or device IDs, expect to get back all zeroes or all ones).

As the value gets masked to the read width when merging back into the
full result, setting the initial value to all ones should not harm any
or the other cases.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Keir Fraser <keir@xxxxxxx>
xen-unstable changeset:   25489:cc46bd403bc4
xen-unstable date:        Fri Jun 22 10:04:30 2012 +0200
---


diff -r ff523faf2be1 -r 3ce155e77f39 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Mon Jul 09 10:30:16 2012 +0100
+++ b/xen/arch/x86/traps.c      Mon Jul 09 10:30:44 2012 +0100
@@ -1678,7 +1678,7 @@ static uint32_t guest_io_read(
     while ( bytes != 0 )
     {
         unsigned int size = 1;
-        uint32_t sub_data = 0xff;
+        uint32_t sub_data = ~0;
 
         if ( (port == 0x42) || (port == 0x43) || (port == 0x61) )
         {

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.