From e9b6be9260a0f43d7b9b709674f3fddd7432057b Mon Sep 17 00:00:00 2001 From: Li Qiang Date: Wed, 12 Sep 2018 09:01:13 -0700 Subject: [PATCH] hw: hyperv_testdev: add read callback Signed-off-by: Li Qiang Message-Id: <20180912160118.21158-4-liq3ea@163.com> Signed-off-by: Paolo Bonzini --- hw/misc/hyperv_testdev.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/misc/hyperv_testdev.c b/hw/misc/hyperv_testdev.c index bf6bbfa8cf..7549f470b1 100644 --- a/hw/misc/hyperv_testdev.c +++ b/hw/misc/hyperv_testdev.c @@ -105,7 +105,12 @@ static void hv_synic_test_dev_control(HypervTestDev *dev, uint32_t ctl, } } -static void hv_test_dev_control(void *opaque, hwaddr addr, uint64_t data, +static uint64_t hv_test_dev_read(void *opaque, hwaddr addr, unsigned size) +{ + return 0; +} + +static void hv_test_dev_write(void *opaque, hwaddr addr, uint64_t data, uint32_t len) { HypervTestDev *dev = HYPERV_TEST_DEV(opaque); @@ -127,7 +132,8 @@ static void hv_test_dev_control(void *opaque, hwaddr addr, uint64_t data, } static const MemoryRegionOps synic_test_sint_ops = { - .write = hv_test_dev_control, + .read = hv_test_dev_read, + .write = hv_test_dev_write, .valid.min_access_size = 4, .valid.max_access_size = 4, .endianness = DEVICE_LITTLE_ENDIAN,