aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-06-09 08:49:21 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-14 16:50:30 +0200
commita44bed2f54185b795d8d8141bd810b554bcb750b (patch)
tree6c4be6dad6b0424ab905dc7f544a37c9126ddf42
parent997340f3c5190a311902eeaabd9413434e97ff4c (diff)
virtio-mmio: stop ioeventfd on legacy reset
If the queue PFN is set to zero on a virtio-mmio device, the device is reset. In that case however the virtio_bus_stop_ioeventfd function was not called; add it so that the behavior is similar to when status is set to 0. Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/virtio/virtio-mmio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index 688eccda94..41a35d31c8 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -376,6 +376,7 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
return;
}
if (value == 0) {
+ virtio_mmio_stop_ioeventfd(proxy);
virtio_reset(vdev);
} else {
virtio_queue_set_addr(vdev, vdev->queue_sel,