xcp-1.6-updates/xen-4.1.hg

changeset 23320:3ce155e77f39

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@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen-unstable changeset: 25489:cc46bd403bc4
xen-unstable date: Fri Jun 22 10:04:30 2012 +0200
author Jan Beulich <jbeulich@novell.com>
date Mon Jul 09 10:30:44 2012 +0100 (2012-07-09)
parents ff523faf2be1
children a1087bfe2c5c
files xen/arch/x86/traps.c
line diff
     1.1 --- a/xen/arch/x86/traps.c	Mon Jul 09 10:30:16 2012 +0100
     1.2 +++ b/xen/arch/x86/traps.c	Mon Jul 09 10:30:44 2012 +0100
     1.3 @@ -1678,7 +1678,7 @@ static uint32_t guest_io_read(
     1.4      while ( bytes != 0 )
     1.5      {
     1.6          unsigned int size = 1;
     1.7 -        uint32_t sub_data = 0xff;
     1.8 +        uint32_t sub_data = ~0;
     1.9  
    1.10          if ( (port == 0x42) || (port == 0x43) || (port == 0x61) )
    1.11          {