ia64/xen-unstable

changeset 18276:11aaad01c5e5

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>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Aug 06 10:54:55 2008 +0100 (2008-08-06)
parents d4dd0195379b
children 384f819f3ac0
files tools/ioemu/hw/pass-through.c
line diff
     1.1 --- a/tools/ioemu/hw/pass-through.c	Wed Aug 06 09:46:25 2008 +0100
     1.2 +++ b/tools/ioemu/hw/pass-through.c	Wed Aug 06 10:54:55 2008 +0100
     1.3 @@ -1513,7 +1513,9 @@ static int pt_bar_reg_parse(
     1.4      /* check 64bit BAR */
     1.5      index = pt_bar_offset_to_index(reg->offset);
     1.6      if ((index > 0) && (index < PCI_ROM_SLOT) &&
     1.7 -        (d->config[bar_64] & PCI_BASE_ADDRESS_MEM_TYPE_64))
     1.8 +        ((d->config[bar_64] & (PCI_BASE_ADDRESS_SPACE |
     1.9 +                               PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
    1.10 +         (PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64)))
    1.11      {
    1.12          region = &ptdev->bases[index-1];
    1.13          if (region->bar_flag != PT_BAR_FLAG_UPPER)