]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/virtio: move vm_running check to virtio_device_started
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 2 Aug 2022 09:49:58 +0000 (10:49 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 7 Oct 2022 13:41:51 +0000 (09:41 -0400)
commit9f6bcfd99f46377888059d8539befec9505f57fb
tree7ebee167ba59b63f6c9058217b0f86c1336cd547
parenta27612311988aff8f29a68ed5eaecde3bf6cdf99
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>
hw/virtio/vhost-user-fs.c
hw/virtio/vhost-user-i2c.c
hw/virtio/vhost-user-rng.c
hw/virtio/vhost-user-vsock.c
hw/virtio/vhost-vsock.c
include/hw/virtio/virtio.h