ioemu-remote&ioemu: fix corrupting register value in pt_pci_write_config().
PATCH 1/1 ioemu-remote&ioemu: fix corrupting register value in pt_pci_write_config().
This patch fixes corrupting register value in pt_pci_write_config(). It can be applied to both ioemu-remote and ioemu.
I forgot to shift value read from real device. If the emulated register offset is not aligned with 4 byte, the write emulation will not be handled well because of corrupting register value read from real device.
The patch fixes this issue.
Signed-off-by Yuji Shimada <[email protected]>
--
Yuji Shimada
hw/pass-through.c +2 -1
@@ -1099,7 +1099,8 @@ static void pt_pci_write_config(PCIDevice *d, uint32_t address, uint32_t val,if (reg_grp_entry ==NULL ) goto out; -/* adjust the write value to appropriate CFC-CFF window */ +/* adjust the read and write value to appropriate CFC-CFF window */ + read_val <<= ((address &3 ) <<3 ); val <<= ((address &3 ) <<3 ); emul_len = len;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel