diff options
author | Shmulik Ladkani <shmulik.ladkani@ravellosystems.com> | 2015-09-21 17:09:02 +0300 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2015-10-12 13:19:29 +0800 |
commit | c6048f849c7e3f009786df76206e895a69de032c (patch) | |
tree | ca425fd786850c6f7dd32cdc3b674a77b4528dad /hw/net | |
parent | a7278b36fcab9af469563bd7b9dadebe2ae25e48 (diff) | |
download | qemu-c6048f849c7e3f009786df76206e895a69de032c.zip qemu-c6048f849c7e3f009786df76206e895a69de032c.tar.gz qemu-c6048f849c7e3f009786df76206e895a69de032c.tar.bz2 |
vmxnet3: Support reading IMR registers on bar0
Instead of asserting, return the actual IMR register value.
This is aligned with what's returned on ESXi.
Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
Tested-by: Dana Rubin <dana.rubin@ravellosystems.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r-- | hw/net/vmxnet3.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 48ced71..057f0dc 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1163,9 +1163,13 @@ vmxnet3_io_bar0_write(void *opaque, hwaddr addr, static uint64_t vmxnet3_io_bar0_read(void *opaque, hwaddr addr, unsigned size) { + VMXNET3State *s = opaque; + if (VMW_IS_MULTIREG_ADDR(addr, VMXNET3_REG_IMR, VMXNET3_MAX_INTRS, VMXNET3_REG_ALIGN)) { - g_assert_not_reached(); + int l = VMW_MULTIREG_IDX_BY_ADDR(addr, VMXNET3_REG_IMR, + VMXNET3_REG_ALIGN); + return s->interrupt_states[l].is_masked; } VMW_CBPRN("BAR0 unknown read [%" PRIx64 "], size %d", addr, size); |