summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2013-05-05 17:51:49 -0300
committerGleb Natapov <gleb@redhat.com>2013-05-06 14:52:26 +0300
commit0c1cd0ae2a4faabeb948b9a07ea1696e853de174 (patch)
tree6e07bcd89e421efbb1fe57dd71aa4f320f6ddde1
parent467b34689d277fa56c09ad07ca0f08d7d7539f6d (diff)
downloadqemu-0c1cd0ae2a4faabeb948b9a07ea1696e853de174.tar.gz
kvmvapic: add ioport read accessor
Necessary since memory region accessor assumes read and write methods are registered. Otherwise reading I/O port 0x7e segfaults. https://bugzilla.redhat.com/show_bug.cgi?id=954306 Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
-rw-r--r--hw/i386/kvmvapic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 5b558aa180..655483bd1d 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -687,8 +687,14 @@ static void vapic_write(void *opaque, hwaddr addr, uint64_t data,
}
}
+static uint64_t vapic_read(void *opaque, hwaddr addr, unsigned size)
+{
+ return 0xffffffff;
+}
+
static const MemoryRegionOps vapic_ops = {
.write = vapic_write,
+ .read = vapic_read,
.endianness = DEVICE_NATIVE_ENDIAN,
};