From: "Michael S. Tsirkin" <mst@redhat.com>
To: "N. B." <n.b@live.com>
Cc: Ning Bo <ning.bo9@zte.com.cn>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
stefanha@redhat.com, "armbru@redhat.com" <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] vhost-vsock: report QMP event when set running
Date: Tue, 30 Jul 2019 16:29:35 -0400 [thread overview]
Message-ID: <20190730162803-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <HK2PR04MB38595779EA521C94675599F981DC0@HK2PR04MB3859.apcprd04.prod.outlook.com>
On Tue, Jul 30, 2019 at 12:24:27PM +0000, N. B. wrote:
> From: Ning Bo <n.b@live.com>
>
> Report vsock running event so that the upper application can
> control boot sequence.
> see https://github.com/kata-containers/runtime/pull/1918
>
> Signed-off-by: Ning Bo <ning.bo9@zte.com.cn>
Cc Stefan.
Stefan, are you willing to maintain virtio/vhost-vsock in qemu, too?
If yes let's add an entry to MAINTAINERS, ok?
> ---
> hw/virtio/vhost-vsock.c | 3 +++
> qapi/char.json | 22 ++++++++++++++++++++++
> 2 files changed, 25 insertions(+)
>
> diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c
> index 0371493..a5920fd 100644
> --- a/hw/virtio/vhost-vsock.c
> +++ b/hw/virtio/vhost-vsock.c
> @@ -22,6 +22,7 @@
> #include "qemu/iov.h"
> #include "qemu/module.h"
> #include "monitor/monitor.h"
> +#include "qapi/qapi-events-char.h"
>
> enum {
> VHOST_VSOCK_SAVEVM_VERSION = 0,
> @@ -68,6 +69,8 @@ static int vhost_vsock_set_running(VHostVSock *vsock, int start)
> if (ret < 0) {
> return -errno;
> }
> + qapi_event_send_vsock_running(vsock->conf.guest_cid, start != 0);
> +
> return 0;
> }
>
> diff --git a/qapi/char.json b/qapi/char.json
> index a6e81ac..0958dd1 100644
> --- a/qapi/char.json
> +++ b/qapi/char.json
> @@ -570,3 +570,25 @@
> { 'event': 'VSERPORT_CHANGE',
> 'data': { 'id': 'str',
> 'open': 'bool' } }
> +
> +##
> +# @VSOCK_RUNNING:
> +#
> +# Emitted when the guest be set running.
> +#
> +# @cid: guest context ID
> +#
> +# @running: true if the vsock be set running
> +#
> +# Since: v4.1.0
> +#
> +# Example:
> +#
> +# <- { "event": "VSOCK_RUNNING",
> +# "data": { "cid": "123456", "running": true },
> +# "timestamp": { "seconds": 1401385907, "microseconds": 422329 } }
> +#
> +##
> +{ 'event': 'VSOCK_RUNNING',
> + 'data': { 'cid': 'uint64',
> + 'running': 'bool' } }
> --
> 2.9.5
next prev parent reply other threads:[~2019-07-30 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 12:24 [Qemu-devel] [PATCH] vhost-vsock: report QMP event when set running N. B.
2019-07-30 13:19 ` Eric Blake
2019-07-30 20:29 ` Michael S. Tsirkin [this message]
2019-08-15 13:20 ` Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2019-08-01 7:28 Ning Bo
2019-08-01 11:17 ` Eric Blake
2019-08-01 15:25 ` Markus Armbruster
2019-08-01 19:15 ` Michael S. Tsirkin
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=20190730162803-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=armbru@redhat.com \
--cc=n.b@live.com \
--cc=ning.bo9@zte.com.cn \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).