[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 2/5] virtio: Set "start_on_kick" for legacy devic
From: |
elohimes |
Subject: |
[Qemu-devel] [PATCH v2 2/5] virtio: Set "start_on_kick" for legacy devices |
Date: |
Tue, 4 Jun 2019 15:34:56 +0800 |
From: Xie Yongji <address@hidden>
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 <address@hidden>
---
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
[Qemu-devel] [PATCH v2 3/5] virtio: Make sure we get correct state of device on handle_aio_output(), elohimes, 2019/06/04
[Qemu-devel] [PATCH v2 4/5] virtio: Don't change "started" flag on virtio_vmstate_change(), elohimes, 2019/06/04
[Qemu-devel] [PATCH v2 5/5] virtio: add "use-started" property, elohimes, 2019/06/04