aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2012-07-09 10:30:44 +0100
committerJan Beulich <jbeulich@novell.com>2012-07-09 10:30:44 +0100
commitc1b91d411864378f4323cdafbecbd5e5d1a23083 (patch)
treedaf03aef13dbb2ecb3da15a24bc1473d52d17f17
parent5ff33f25fdb131500779cc81ac26c454cd175e9c (diff)
downloadxen-c1b91d411864378f4323cdafbecbd5e5d1a23083.tar.gz
xen-c1b91d411864378f4323cdafbecbd5e5d1a23083.tar.bz2
xen-c1b91d411864378f4323cdafbecbd5e5d1a23083.zip
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
-rw-r--r--xen/arch/x86/traps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 9ad1b34303..9d13f3fe2d 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -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) )
{