diff options
-rw-r--r-- | hw/virtio/virtio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index e098fc8ef0..18f9f4c372 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1163,7 +1163,10 @@ int virtio_set_status(VirtIODevice *vdev, uint8_t val) } } - virtio_set_started(vdev, val & VIRTIO_CONFIG_S_DRIVER_OK); + if ((vdev->status & VIRTIO_CONFIG_S_DRIVER_OK) != + (val & VIRTIO_CONFIG_S_DRIVER_OK)) { + virtio_set_started(vdev, val & VIRTIO_CONFIG_S_DRIVER_OK); + } if (k->set_status) { k->set_status(vdev, val); |