summaryrefslogtreecommitdiffstats
path: root/hw/virtio
diff options
context:
space:
mode:
authorXie Yongji2019-06-26 04:31:27 +0200
committerMichael S. Tsirkin2019-07-04 23:00:32 +0200
commit7abccd088c9ef4c66dc891ff634a1f381ed4b2a8 (patch)
tree9047cf91c553204270c8600155744387b9037508 /hw/virtio
parentvirtio: add "use-started" property (diff)
downloadqemu-7abccd088c9ef4c66dc891ff634a1f381ed4b2a8.tar.gz
qemu-7abccd088c9ef4c66dc891ff634a1f381ed4b2a8.tar.xz
qemu-7abccd088c9ef4c66dc891ff634a1f381ed4b2a8.zip
virtio: Set "start_on_kick" for legacy devices
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 <xieyongji@baidu.com> Reviewed-by: Greg Kurz <groug@kaod.org> Message-Id: <20190626023130.31315-3-xieyongji@baidu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/virtio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index c9a6ca04b8..f7504d1395 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -1212,8 +1212,7 @@ void virtio_reset(void *opaque)
k->reset(vdev);
}
- vdev->start_on_kick = (virtio_host_has_feature(vdev, VIRTIO_F_VERSION_1) &&
- !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1));
+ vdev->start_on_kick = !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1);
vdev->started = false;
vdev->broken = false;
vdev->guest_features = 0;
@@ -2325,8 +2324,7 @@ void virtio_init(VirtIODevice *vdev, const char *name,
g_malloc0(sizeof(*vdev->vector_queues) * nvectors);
}
- vdev->start_on_kick = (virtio_host_has_feature(vdev, VIRTIO_F_VERSION_1) &&
- !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1));
+ vdev->start_on_kick = !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1);
vdev->started = false;
vdev->device_id = device_id;
vdev->status = 0;