From: Xie Yongji <xieyon...@baidu.com> Besides virtio 1.0 transitional devices, we should also set "start_on_kick" flag for legacy devices (virtio 0.9).
Signed-off-by: Xie Yongji <xieyon...@baidu.com> --- hw/virtio/virtio.c | 2 -- include/hw/virtio/virtio.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 6508b2faad..6ec45d8f0a 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2080,7 +2080,6 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t val) } if (!vdev->started && - virtio_host_has_feature(vdev, VIRTIO_F_VERSION_1) && !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) { vdev->start_on_kick = true; } @@ -2236,7 +2235,6 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id) } if (!vdev->started && - virtio_host_has_feature(vdev, VIRTIO_F_VERSION_1) && !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1)) { vdev->start_on_kick = true; } diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 27c0efc3d0..303242b3c2 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -106,7 +106,7 @@ struct VirtIODevice bool vm_running; bool broken; /* device in invalid state, needs reset */ bool started; - bool start_on_kick; /* virtio 1.0 transitional devices support that */ + bool start_on_kick; /* when virtio 1.0 feature has not been negotiated */ VMChangeStateEntry *vmstate; char *bus_name; uint8_t device_endian; -- 2.17.1