diff options
Diffstat (limited to 'hw/virtio/virtio.c')
-rw-r--r-- | hw/virtio/virtio.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index ac222385d6..5c981801f3 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1108,10 +1108,7 @@ static void virtio_vmstate_change(void *opaque, int running, RunState state) BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); bool backend_run = running && (vdev->status & VIRTIO_CONFIG_S_DRIVER_OK); - - if (running) { - vdev->vm_running = running; - } + vdev->vm_running = running; if (backend_run) { virtio_set_status(vdev, vdev->status); @@ -1124,10 +1121,6 @@ static void virtio_vmstate_change(void *opaque, int running, RunState state) if (!backend_run) { virtio_set_status(vdev, vdev->status); } - - if (!running) { - vdev->vm_running = running; - } } void virtio_init(VirtIODevice *vdev, const char *name, |