[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/1] kvmvapic: add ioport read accessor
From: |
Gleb Natapov |
Subject: |
[Qemu-devel] [PATCH 1/1] kvmvapic: add ioport read accessor |
Date: |
Mon, 6 May 2013 15:44:43 +0300 |
From: Marcelo Tosatti <address@hidden>
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 <address@hidden>
Reviewed-by: Jan Kiszka <address@hidden>
Signed-off-by: Gleb Natapov <address@hidden>
---
hw/i386/kvmvapic.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 5b558aa..655483b 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,
};
--
1.7.10.4