xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH qemu-traditional] ioreq: Support 32-bit default_ioport_* accesses
@ 2016-05-20 13:52 Boris Ostrovsky
  2016-05-23 12:02 ` Wei Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Boris Ostrovsky @ 2016-05-20 13:52 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, boris.ostrovsky, ian.jackson

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@oracle.com>
---
 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@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-05-26 14:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-20 13:52 [PATCH qemu-traditional] ioreq: Support 32-bit default_ioport_* accesses Boris Ostrovsky
2016-05-23 12:02 ` Wei Liu
2016-05-23 13:02   ` Boris Ostrovsky
2016-05-23 13:05     ` Wei Liu
2016-05-23 13:42 ` Wei Liu
2016-05-25 14:26 ` Ian Jackson
2016-05-25 14:35   ` Ian Jackson
2016-05-25 15:08     ` Boris Ostrovsky
2016-05-25 15:22       ` Ian Jackson
2016-05-25 15:36         ` Boris Ostrovsky
2016-05-25 16:03           ` Jan Beulich
2016-05-25 16:09             ` Ian Jackson
2016-05-25 16:51               ` Boris Ostrovsky
2016-05-25 16:57                 ` Boris Ostrovsky
2016-05-26 14:00                 ` Ian Jackson
2016-05-25 16:02       ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).