qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [BUGFIX][PATCH v7 1/9] vmport: The io memory region needs t


From: Don Slutz
Subject: [Qemu-devel] [BUGFIX][PATCH v7 1/9] vmport: The io memory region needs to be at least a size of 4
Date: Fri, 12 Jun 2015 10:05:48 -0400

Before:

commit c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
Author: Peter Crosthwaite <address@hidden>
Date:   Mon Mar 16 22:35:54 2015 -0700

    exec: Respect as_tranlsate_internal length clamp

it did not matter.  Only accept I/O that starts on 1st
port.

Signed-off-by: Don Slutz <address@hidden>
CC: Don Slutz <address@hidden>
---
 hw/misc/vmport.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c
index 7fcc00d..51b64bc 100644
--- a/hw/misc/vmport.c
+++ b/hw/misc/vmport.c
@@ -69,6 +69,10 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr addr,
     unsigned char command;
     uint32_t eax;
 
+    /* Only support 1 address */
+    if (addr) {
+        return ~0U;
+    }
     cpu_synchronize_state(cs);
 
     eax = env->regs[R_EAX];
@@ -159,7 +163,7 @@ static void vmport_realizefn(DeviceState *dev, Error **errp)
     ISADevice *isadev = ISA_DEVICE(dev);
     VMPortState *s = VMPORT(dev);
 
-    memory_region_init_io(&s->io, OBJECT(s), &vmport_ops, s, "vmport", 1);
+    memory_region_init_io(&s->io, OBJECT(s), &vmport_ops, s, "vmport", 4);
     isa_register_ioport(isadev, &s->io, 0x5658);
 
     port_state = s;
-- 
1.8.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]