virtio-mmio: stop ioeventfd on legacy reset
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Jun 2022 06:49:21 +0000 (08:49 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Jun 2022 14:50:30 +0000 (16:50 +0200)
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>
hw/virtio/virtio-mmio.c

index 688eccda94d7ed0c67d9612ec849f67abd10b904..41a35d31c8c8e86be93fc7529cd77b8400cec68b 100644 (file)
@@ -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,