summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Qiang <liq3ea@gmail.com>2018-09-12 09:01:13 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-02 19:09:10 +0200
commite9b6be9260a0f43d7b9b709674f3fddd7432057b (patch)
tree0db0289ad7991e153279640055f4d5bf26d5edd9
parent57cdec5e5f5f0838bf1a8c9feb4e304144a019f3 (diff)
hw: hyperv_testdev: add read callback
Signed-off-by: Li Qiang <liq3ea@gmail.com> Message-Id: <20180912160118.21158-4-liq3ea@163.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/misc/hyperv_testdev.c10
1 files 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,