[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH qemu-traditional] ioreq: Support 32-bit default_ioport_* accesses



Recent changes in ACPICA (specifically, Linux commit 66b1ed5aa8dd ("ACPICA:
ACPI 2.0, Hardware: Add access_width/bit_offset support for
acpi_hw_write()") result in guests issuing 32-bit accesses to IO space.

QEMU needs to be able to handle them.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
---
 vl.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/vl.c b/vl.c
index c864e7d..79d3ab5 100644
--- a/vl.c
+++ b/vl.c
@@ -350,17 +350,18 @@ static void default_ioport_writew(void *opaque, uint32_t 
address, uint32_t data)
 
 static uint32_t default_ioport_readl(void *opaque, uint32_t address)
 {
-#ifdef DEBUG_UNUSED_IOPORT
-    fprintf(stderr, "unused inl: port=0x%04x\n", address);
-#endif
-    return 0xffffffff;
+    uint32_t data;
+    data = default_ioport_readw(opaque, address) & 0xffff;
+    address = (address + 2) & (MAX_IOPORTS - 1);
+    data |= default_ioport_readw(opaque, address) << 16;
+    return data;
 }
 
 static void default_ioport_writel(void *opaque, uint32_t address, uint32_t 
data)
 {
-#ifdef DEBUG_UNUSED_IOPORT
-    fprintf(stderr, "unused outl: port=0x%04x data=0x%02x\n", address, data);
-#endif
+    default_ioport_writew(opaque, address, data & 0xffff);
+    address = (address + 2) & (MAX_IOPORTS - 1);
+    default_ioport_writew(opaque, address, data >> 16);
 }
 
 /* size is the word size in byte */
-- 
1.8.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.