From: Greg Kurz <groug@kaod.org>
To: elohimes@gmail.com
Cc: ehabkost@redhat.com, mst@redhat.com, qemu-devel@nongnu.org,
dgilbert@redhat.com, Xie Yongji <xieyongji@baidu.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/5] virtio: Set "start_on_kick" for legacy devices
Date: Sun, 16 Jun 2019 19:27:08 +0200 [thread overview]
Message-ID: <20190616192708.4b824da5@bahia.lan> (raw)
In-Reply-To: <20190614093121.5580-3-xieyongji@baidu.com>
On Fri, 14 Jun 2019 17:31:18 +0800
elohimes@gmail.com wrote:
> From: Xie Yongji <xieyongji@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 <xieyongji@baidu.com>
> ---
Reviewed-by: Greg Kurz <groug@kaod.org>
> hw/virtio/virtio.c | 6 ++----
> include/hw/virtio/virtio.h | 2 +-
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index 19062fbb96..473881e9ec 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;
> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
> index 15d5366939..b189788cb2 100644
> --- a/include/hw/virtio/virtio.h
> +++ b/include/hw/virtio/virtio.h
> @@ -107,7 +107,7 @@ struct VirtIODevice
> bool broken; /* device in invalid state, needs reset */
> bool use_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;
> char *bus_name;
> uint8_t device_endian;
next prev parent reply other threads:[~2019-06-16 17:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 9:31 [Qemu-devel] [PATCH v3 0/5] virtio: fix some issues of "started" and "start_on_kick" flag elohimes
2019-06-14 9:31 ` [Qemu-devel] [PATCH v3 1/5] virtio: add "use-started" property elohimes
2019-06-14 11:44 ` Greg Kurz
2019-06-17 2:14 ` Yongji Xie
2019-06-17 5:20 ` Greg Kurz
2019-06-17 6:04 ` Yongji Xie
2019-06-22 15:51 ` Greg Kurz
2019-06-24 9:44 ` Yongji Xie
2019-06-14 9:31 ` [Qemu-devel] [PATCH v3 2/5] virtio: Set "start_on_kick" for legacy devices elohimes
2019-06-16 17:27 ` Greg Kurz [this message]
2019-06-14 9:31 ` [Qemu-devel] [PATCH v3 3/5] virtio: Set "start_on_kick" on virtio_set_features() elohimes
2019-06-14 9:31 ` [Qemu-devel] [PATCH v3 4/5] virtio: Make sure we get correct state of device on handle_aio_output() elohimes
2019-06-14 9:31 ` [Qemu-devel] [PATCH v3 5/5] virtio: Don't change "started" flag on virtio_vmstate_change() elohimes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190616192708.4b824da5@bahia.lan \
--to=groug@kaod.org \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=elohimes@gmail.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xieyongji@baidu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).