aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-08-01 09:54:54 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-08-01 09:54:54 +0100
commit85d4d8cb0553b453d0ed843299072c5ab6a527da (patch)
tree710d6258be18380936b3dcfe5b27ec5a1797e451
parent8c715178a115fd4eab786653eb5fcc093a4a18fd (diff)
downloadxen-85d4d8cb0553b453d0ed843299072c5ab6a527da.tar.gz
xen-85d4d8cb0553b453d0ed843299072c5ab6a527da.tar.bz2
xen-85d4d8cb0553b453d0ed843299072c5ab6a527da.zip
ioemu, passthrough: fix flag for expansion rom base address register.
pt_bar_reg_parse() is called for expansion rom base address register. Currently it returns PT_BAR_FLAG_MEM if bit 0 is 0. It returns PT_BAR_FLAG_IO if bit 0 is 1. But bit 0 in expansion rom base address register is enable bit. If bit 0 is 1 for some reason, it returns PT_BAR_FLAG_IO. Expansion rom is mapped to memory space. It should return PT_BAR_FLAG_MEM. After applying this patch, it returns PT_BAR_FLAG_MEM regardless of bit 0, when it is called for expansion rom base address register. Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
-rw-r--r--tools/ioemu/hw/pass-through.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/ioemu/hw/pass-through.c b/tools/ioemu/hw/pass-through.c
index 428845f2c9..ce24034de0 100644
--- a/tools/ioemu/hw/pass-through.c
+++ b/tools/ioemu/hw/pass-through.c
@@ -1528,6 +1528,13 @@ static int pt_bar_reg_parse(
if (!r->size)
goto out;
+ /* for ExpROM BAR */
+ if (index == PCI_ROM_SLOT)
+ {
+ bar_flag = PT_BAR_FLAG_MEM;
+ goto out;
+ }
+
/* check BAR I/O indicator */
if (d->config[reg->offset] & PCI_BASE_ADDRESS_SPACE_IO)
bar_flag = PT_BAR_FLAG_IO;