[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/5] virtio: Set "start_on_kick" for legacy d
From: |
Greg Kurz |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/5] virtio: Set "start_on_kick" for legacy devices |
Date: |
Wed, 5 Jun 2019 08:42:24 +0200 |
On Tue, 4 Jun 2019 15:34:56 +0800
address@hidden wrote:
> 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>
> ---
Patch looks good but it would be even better if applied
earlier so that it doesn't revert lines added by the
previous patch...
> 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) &&
... here and...
> !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) &&
... here.
> !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;
[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