diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-08-06 10:54:55 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-08-06 10:54:55 +0100 |
commit | f583eb1e3ed0465844c8fb0a1387283696ec5a5a (patch) | |
tree | 9a79f6cf8b889b809d94a4313c11e039a2182448 /tools | |
parent | 7b256cf63fd10776ff064829b74d3fa0a194378d (diff) | |
download | xen-f583eb1e3ed0465844c8fb0a1387283696ec5a5a.tar.gz xen-f583eb1e3ed0465844c8fb0a1387283696ec5a5a.tar.bz2 xen-f583eb1e3ed0465844c8fb0a1387283696ec5a5a.zip |
ioemu: Fix I/O BAR mapping problem
Check BAR type indicator to avoid I/O BAR being mistaken as 64-bit =
memory BAR.
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ioemu/hw/pass-through.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/ioemu/hw/pass-through.c b/tools/ioemu/hw/pass-through.c index ce24034de0..3903a0a1fc 100644 --- a/tools/ioemu/hw/pass-through.c +++ b/tools/ioemu/hw/pass-through.c @@ -1513,7 +1513,9 @@ static int pt_bar_reg_parse( /* check 64bit BAR */ index = pt_bar_offset_to_index(reg->offset); if ((index > 0) && (index < PCI_ROM_SLOT) && - (d->config[bar_64] & PCI_BASE_ADDRESS_MEM_TYPE_64)) + ((d->config[bar_64] & (PCI_BASE_ADDRESS_SPACE | + PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == + (PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64))) { region = &ptdev->bases[index-1]; if (region->bar_flag != PT_BAR_FLAG_UPPER) |