virtio core often needs to know whether device is started, this is what virtio_device_started already did. However, backends want to know whether virtio is actually running which also depends on whether vm is running. To address this we moved the check to virtio_device_started, but this changes virtio core behavior which wasn't intentional. Now that backends use the new virtio_device_running API, revert the change to virtio_device_started.
Fixes: 9f6bcfd99f ("hw/virtio: move vm_running check to virtio_device_started") Cc: "Alex Bennée" <alex.ben...@linaro.org> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include/hw/virtio/virtio.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 634c24513f..de8d78af12 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -395,10 +395,6 @@ static inline bool virtio_device_started(VirtIODevice *vdev, uint8_t status) return vdev->started; } - if (!vdev->vm_running) { - return false; - } - return status & VIRTIO_CONFIG_S_DRIVER_OK; } -- MST