hw/virtio: move vm_running check to virtio_device_started
All the boilerplate virtio code does the same thing (or should at least) of checking to see if the VM is running before attempting to start VirtIO. Push the logic up to the common function to avoid getting a copy and paste wrong. Signed-off-by:Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220802095010.3330793-11-alex.bennee@linaro.org> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
Showing
- hw/virtio/vhost-user-fs.c 1 addition, 5 deletionshw/virtio/vhost-user-fs.c
- hw/virtio/vhost-user-i2c.c 1 addition, 5 deletionshw/virtio/vhost-user-i2c.c
- hw/virtio/vhost-user-rng.c 1 addition, 5 deletionshw/virtio/vhost-user-rng.c
- hw/virtio/vhost-user-vsock.c 1 addition, 5 deletionshw/virtio/vhost-user-vsock.c
- hw/virtio/vhost-vsock.c 1 addition, 5 deletionshw/virtio/vhost-vsock.c
- include/hw/virtio/virtio.h 5 additions, 0 deletionsinclude/hw/virtio/virtio.h
Please register or sign in to comment