From: Cornelia Huck <cohuck@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Jan Dakinevich <jan.dakinevich@virtuozzo.com>,
Kevin Wolf <kwolf@redhat.com>,
"Denis V. Lunev" <den@virtuozzo.com>,
qemu-block@nongnu.org, Amit Shah <amit@kernel.org>,
Jason Wang <jasowang@redhat.com>,
qemu-devel@nongnu.org,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [RFC v6 1/2] virtio: introduce `query-virtio' QMP command
Date: Wed, 20 Dec 2017 13:47:54 +0100 [thread overview]
Message-ID: <20171220134754.77999bcf.cohuck@redhat.com> (raw)
In-Reply-To: <873745d7qp.fsf@dusky.pond.sub.org>
On Wed, 20 Dec 2017 11:16:46 +0100
Markus Armbruster <armbru@redhat.com> wrote:
> Jan Dakinevich <jan.dakinevich@virtuozzo.com> writes:
>
> > On Tue, 19 Dec 2017 15:57:18 +0100
> > Markus Armbruster <armbru@redhat.com> wrote:
> >> Jan Dakinevich <jan.dakinevich@virtuozzo.com> writes:
> Taking a step back: what's the intended purpose of query-virtio? The
> cover letter doesn't really say:
>
> After some discussion, I am going to suggest reworked QMP/HMP for
> gathering virtio info. It would provide the following monitor output.
>
> (qemu) info virtio
> virtio-blk-device at 0000:00:02.0
> QOM path: /machine/peripheral-anon/device[0]/virtio-backend
> status: 0x0f
> VIRTIO_CONFIG_S_ACKNOWLEDGE
> VIRTIO_CONFIG_S_DRIVER
> VIRTIO_CONFIG_S_DRIVER_OK
> VIRTIO_CONFIG_S_FEATURES_OK
> host features: 0x0000000179000e54
> guest features: 0x0000000130000e54
> common features:
> VIRTIO_F_NOTIFY_ON_EMPTY
> VIRTIO_F_ANY_LAYOUT
> VIRTIO_RING_F_INDIRECT_DESC acked
> VIRTIO_RING_F_EVENT_IDX acked
> VIRTIO_F_BAD_FEATURE
> VIRTIO_F_VERSION_1 acked
> device features:
> VIRTIO_BLK_F_SEG_MAX acked
> VIRTIO_BLK_F_BLK_SIZE acked
> VIRTIO_BLK_F_FLUSH acked
> VIRTIO_BLK_F_TOPOLOGY acked
>
> The first sentence carries no useful information; suggest to scratch it.
> The rest is an HMP example. Examples are great, but we really need to
> understand *why* you need this command.
From my side, I see at least two use cases:
- Monitoring the state of virtio devices. If I can see from outside
that VIRTIO_CONFIG_S_FAILED or VIRTIO_CONFIG_S_NEEDS_RESET has been
set for a device, I know that something went wrong for that device.
- Debugging. This command gives me a nice way to find out why something
is not working as it is supposed to, or to verify that something
indeed does work as intended (I would have found such a command quite
useful when implementing virtio-1).
>
> >> In case symbolic names may not be known at QEMU compile time (me
> >> having to wonder at v6 is a sign of rather ineffective patch review,
> >> sorry about that): you have to explain this in the doc comment, with a
> >> reference to where the bits are specified.
> >>
> >
> > ok
>
> Can you think of a scenario where status or feature bits occur that are
> not known to QEMU at compile time?
Could happen for status bits (although very unlikely). For feature
bits, the guest is supposed to ack a subset of the offered bits, so
this would mean a fundamentally broken guest (also unlikely, but not
impossible).
>
> >> > +#
> >> > +# @status-names: names of checked bits in status bitmask
> >>
> >> How are the strings in @status-names connected to the bits in @status?
> >> Spell it out in this doc string, please.
> >>
> >
> > ok
> >
> > ...but, strictly saying, I was not going to show in QAPI how these names
> > are mapped into bits, QMP answer would not contain how these names are
> > connected to bits. Otherwise, It would be reinvention of v4.
>
> To avoid going in circles some more, let's take a step back and examine
> what exactly you're trying to accomplish. Give us use cases: this is my
> need, and this is how you use the proposed command to satisfy my need.
> Also give us design limitations: what the command is *not* trying to do.
next prev parent reply other threads:[~2017-12-20 12:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-17 20:25 [Qemu-devel] [RFC v6 0/2] virtio: introduce `info virtio' hmp command Jan Dakinevich
2017-12-17 20:25 ` [Qemu-devel] [RFC v6 1/2] virtio: introduce `query-virtio' QMP command Jan Dakinevich
2017-12-19 14:57 ` Markus Armbruster
2017-12-20 0:47 ` Jan Dakinevich
2017-12-20 10:16 ` Markus Armbruster
2017-12-20 12:47 ` Cornelia Huck [this message]
2017-12-20 13:05 ` Dr. David Alan Gilbert
2017-12-17 20:25 ` [Qemu-devel] [RFC v6 2/2] virtio: add `info virtio' HMP command Jan Dakinevich
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=20171220134754.77999bcf.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=amit@kernel.org \
--cc=armbru@redhat.com \
--cc=den@virtuozzo.com \
--cc=dgilbert@redhat.com \
--cc=jan.dakinevich@virtuozzo.com \
--cc=jasowang@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.