From: Jonah Palmer <jonah.palmer@oracle.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: mst@redhat.com, qemu_oss@crudebyte.com, qemu-devel@nongnu.org,
kraxel@redhat.com, si-wei.liu@oracle.com,
joao.m.martins@oracle.com, eblake@redhat.com,
qemu-block@nongnu.org, david@redhat.com, arei.gonglei@huawei.com,
marcandre.lureau@redhat.com, lvivier@redhat.com,
thuth@redhat.com, michael.roth@amd.com, groug@kaod.org,
dgilbert@redhat.com, eric.auger@redhat.com, stefanha@redhat.com,
boris.ostrovsky@oracle.com, kwolf@redhat.com,
mathieu.poirier@linaro.org, raphael.norwitz@nutanix.com,
pbonzini@redhat.com
Subject: Re: [PATCH v9 3/8] qmp: add QMP command x-query-virtio
Date: Thu, 11 Nov 2021 04:07:30 -0500 [thread overview]
Message-ID: <5eaea4db-7a5f-4918-3967-05c080f7821e@oracle.com> (raw)
In-Reply-To: <87sfw4xloq.fsf@dusky.pond.sub.org>
[-- Attachment #1: Type: text/plain, Size: 3481 bytes --]
On 11/10/21 07:03, Markus Armbruster wrote:
> Jonah Palmer<jonah.palmer@oracle.com> writes:
>
>> From: Laurent Vivier<lvivier@redhat.com>
>>
>> This new command lists all the instances of VirtIODevice with
>> their QOM paths and virtio type/name.
>>
>> Signed-off-by: Jonah Palmer<jonah.palmer@oracle.com>
> [...]
>
>> diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
>> index 4912b97..1512ada 100644
>> --- a/qapi/qapi-schema.json
>> +++ b/qapi/qapi-schema.json
>> @@ -93,3 +93,4 @@
>> { 'include': 'audio.json' }
>> { 'include': 'acpi.json' }
>> { 'include': 'pci.json' }
>> +{ 'include': 'virtio.json' }
>> diff --git a/qapi/virtio.json b/qapi/virtio.json
>> new file mode 100644
>> index 0000000..324ba8c
>> --- /dev/null
>> +++ b/qapi/virtio.json
>> @@ -0,0 +1,55 @@
>> +# -*- Mode: Python -*-
>> +# vim: filetype=python
>> +#
>> +
>> +##
>> +# = Virtio devices
>> +##
>> +
>> +##
>> +# @VirtioInfo:
>> +#
>> +# Basic information about a given VirtIODevice
>> +#
>> +# @path: the device's canonical QOM path
>> +#
>> +# @type: VirtIO device name
>> +#
>> +# Since: 6.3
> I expect the next release to be numbered 7.0.
Got it. I'll update this for next series.
>
>> +#
>> +##
>> +{ 'struct': 'VirtioInfo',
>> + 'data': { 'path': 'str',
>> + 'type': 'str' } }
>> +
>> +##
>> +# @x-query-virtio:
>> +#
>> +# Returns a list of all realized VirtIO devices
>> +#
>> +# Features:
>> +# @unstable: This command is meant for debugging.
>> +#
>> +# Returns: list of gathered @VirtioInfo devices
>> +#
>> +# Since: 6.3
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "x-query-virtio" }
>> +# <- { "return": [ { "path": "/machine/peripheral-anon/device[4]/virtio-backend",
>> +# "type": "virtio-input" },
>> +# { "path": "/machine/peripheral/crypto0/virtio-backend",
>> +# "type": "virtio-crypto" },
>> +# { "path": "/machine/peripheral-anon/device[2]/virtio-backend",
>> +# "type": "virtio-scsi" },
>> +# { "path": "/machine/peripheral-anon/device[1]/virtio-backend",
>> +# "type": "virtio-net" },
>> +# { "path": "/machine/peripheral-anon/device[0]/virtio-backend",
>> +# "type": "virtio-serial" }
>> +# ] }
> Any particular reason for reformatting the example? For what it's
> worth, I'd prefer the previous version.
>
> Aside: consistent formatting of examples would be nice. Not in this
> series.
I think I got a little too excited reformatting. I'll revert the examples back to
their original format and make sure the rest of the examples throughout the entire
series are consistent with each other.
>
>> +#
>> +##
>> +
>> +{ 'command': 'x-query-virtio', 'returns': ['VirtioInfo'],
>> + 'features': [ 'unstable' ] }
>> diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
>> index 7f103ea..fd00ee2 100644
>> --- a/tests/qtest/qmp-cmd-test.c
>> +++ b/tests/qtest/qmp-cmd-test.c
>> @@ -103,6 +103,7 @@ static bool query_is_ignored(const char *cmd)
>> "query-gic-capabilities", /* arm */
>> /* Success depends on target-specific build configuration: */
>> "query-pci", /* CONFIG_PCI */
>> + "x-query-virtio", /* CONFIG_VIRTIO */
>> /* Success depends on launching SEV guest */
>> "query-sev-launch-measure",
>> /* Success depends on Host or Hypervisor SEV support */
[-- Attachment #2: Type: text/html, Size: 4948 bytes --]
next prev parent reply other threads:[~2021-11-11 9:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 10:23 [PATCH v9 0/8] hmp,qmp: Add commands to introspect virtio devices Jonah Palmer
2021-11-10 10:23 ` [PATCH v9 1/8] virtio: drop name parameter for virtio_init() Jonah Palmer
2021-11-10 10:23 ` [PATCH v9 2/8] virtio: add vhost support for virtio devices Jonah Palmer
2021-11-10 10:23 ` [PATCH v9 3/8] qmp: add QMP command x-query-virtio Jonah Palmer
2021-11-10 12:03 ` Markus Armbruster
2021-11-11 9:07 ` Jonah Palmer [this message]
2021-11-10 10:23 ` [PATCH v9 4/8] qmp: add QMP command x-query-virtio-status Jonah Palmer
2021-11-10 13:08 ` Markus Armbruster
2021-11-11 9:09 ` Jonah Palmer
2021-11-10 10:23 ` [PATCH v9 5/8] qmp: decode feature & status bits in virtio-status Jonah Palmer
2021-11-10 13:49 ` Markus Armbruster
2021-11-11 10:15 ` Jonah Palmer
2021-11-19 12:32 ` Markus Armbruster
2021-11-10 10:23 ` [PATCH v9 6/8] qmp: add QMP commands for virtio/vhost queue-status Jonah Palmer
2021-11-10 10:23 ` [PATCH v9 7/8] qmp: add QMP command x-query-virtio-queue-element Jonah Palmer
2021-11-10 13:52 ` Markus Armbruster
2021-11-11 10:18 ` Jonah Palmer
2021-11-19 12:33 ` Markus Armbruster
2021-11-10 10:23 ` [PATCH v9 8/8] hmp: add virtio commands Jonah Palmer
2021-11-10 13:30 ` Markus Armbruster
2021-11-11 10:25 ` Jonah Palmer
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=5eaea4db-7a5f-4918-3967-05c080f7821e@oracle.com \
--to=jonah.palmer@oracle.com \
--cc=arei.gonglei@huawei.com \
--cc=armbru@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=eric.auger@redhat.com \
--cc=groug@kaod.org \
--cc=joao.m.martins@oracle.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mathieu.poirier@linaro.org \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu_oss@crudebyte.com \
--cc=raphael.norwitz@nutanix.com \
--cc=si-wei.liu@oracle.com \
--cc=stefanha@redhat.com \
--cc=thuth@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).