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>
This commit is contained in:
Li Qiang 2018-09-12 09:01:13 -07:00 committed by Paolo Bonzini
parent 57cdec5e5f
commit e9b6be9260

View File

@ -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,