From: Marcelo Tosatti Date: Sun, 5 May 2013 20:51:49 +0000 (-0300) Subject: kvmvapic: add ioport read accessor X-Git-Tag: qemu-xen-4.4.0-rc1~6^2~444^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0c1cd0ae2a4faabeb948b9a07ea1696e853de174;p=qemu-upstream-4.5-testing.git 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 Reviewed-by: Jan Kiszka Signed-off-by: Gleb Natapov --- diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 5b558aa18..655483bd1 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, };