aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio/virtio-bus.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-06-09 08:41:14 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-14 16:50:30 +0200
commit9e43a83041ab0e334425c7a1f2309453011224ec (patch)
tree1b541334d89dc95ba5005f7ed6e29bcc75ab77b2 /hw/virtio/virtio-bus.c
parenta44bed2f54185b795d8d8141bd810b554bcb750b (diff)
virtio: stop ioeventfd on reset
All calls to virtio_bus_reset are preceded by virtio_bus_stop_ioeventfd, move the call in virtio_bus_reset: that makes sense and clarifies that the vdc->reset function is called with ioeventfd already stopped. Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-bus.c')
-rw-r--r--hw/virtio/virtio-bus.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
index d7ec023adf..896feb37a1 100644
--- a/hw/virtio/virtio-bus.c
+++ b/hw/virtio/virtio-bus.c
@@ -104,6 +104,7 @@ void virtio_bus_reset(VirtioBusState *bus)
VirtIODevice *vdev = virtio_bus_get_device(bus);
DPRINTF("%s: reset device.\n", BUS(bus)->name);
+ virtio_bus_stop_ioeventfd(bus);
if (vdev != NULL) {
virtio_reset(vdev);
}