mirror of
https://github.com/qemu/qemu.git
synced 2024-12-21 11:13:48 +08:00
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>
This commit is contained in:
parent
e57f2c31b6
commit
7abccd088c
@ -1212,8 +1212,7 @@ void virtio_reset(void *opaque)
|
|||||||
k->reset(vdev);
|
k->reset(vdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
vdev->start_on_kick = (virtio_host_has_feature(vdev, VIRTIO_F_VERSION_1) &&
|
vdev->start_on_kick = !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1);
|
||||||
!virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1));
|
|
||||||
vdev->started = false;
|
vdev->started = false;
|
||||||
vdev->broken = false;
|
vdev->broken = false;
|
||||||
vdev->guest_features = 0;
|
vdev->guest_features = 0;
|
||||||
@ -2325,8 +2324,7 @@ void virtio_init(VirtIODevice *vdev, const char *name,
|
|||||||
g_malloc0(sizeof(*vdev->vector_queues) * nvectors);
|
g_malloc0(sizeof(*vdev->vector_queues) * nvectors);
|
||||||
}
|
}
|
||||||
|
|
||||||
vdev->start_on_kick = (virtio_host_has_feature(vdev, VIRTIO_F_VERSION_1) &&
|
vdev->start_on_kick = !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1);
|
||||||
!virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1));
|
|
||||||
vdev->started = false;
|
vdev->started = false;
|
||||||
vdev->device_id = device_id;
|
vdev->device_id = device_id;
|
||||||
vdev->status = 0;
|
vdev->status = 0;
|
||||||
|
@ -107,7 +107,7 @@ struct VirtIODevice
|
|||||||
bool broken; /* device in invalid state, needs reset */
|
bool broken; /* device in invalid state, needs reset */
|
||||||
bool use_started;
|
bool use_started;
|
||||||
bool started;
|
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;
|
VMChangeStateEntry *vmstate;
|
||||||
char *bus_name;
|
char *bus_name;
|
||||||
uint8_t device_endian;
|
uint8_t device_endian;
|
||||||
|
Loading…
Reference in New Issue
Block a user