All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonah Palmer <jonah.palmer@oracle.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: fam@euphon.net, kwolf@redhat.com, thuth@redhat.com,
	qemu-block@nongnu.org, amit@kernel.org, michael.roth@amd.com,
	jasowang@redhat.com, mst@redhat.com, david@redhat.com,
	qemu-devel@nongnu.org, laurent@vivier.eu, eric.auger@redhat.com,
	dmitrii.stepanov@cloud.ionos.com, kraxel@redhat.com,
	stefanha@redhat.com, pbonzini@redhat.com, si-wei.liu@oracle.com,
	marcandre.lureau@redhat.com, joao.m.martins@oracle.com,
	mreitz@redhat.com, armbru@redhat.com
Subject: Re: [RFC v5 1/6] qmp: add QMP command x-debug-query-virtio
Date: Wed, 2 Jun 2021 06:23:35 -0400	[thread overview]
Message-ID: <93c20860-a9bb-0565-a5cc-88525c6ee71e@oracle.com> (raw)
In-Reply-To: <YFuFl933UxoBKQ1C@work-vm>

[-- Attachment #1: Type: text/plain, Size: 3046 bytes --]


On 3/24/21 2:31 PM, Dr. David Alan Gilbert wrote:
> * Jonah Palmer (jonah.palmer@oracle.com) wrote:
>> From: Laurent Vivier <lvivier@redhat.com>
>>
> <snip>
>
>> --- /dev/null
>> +++ b/qapi/virtio.json
>> @@ -0,0 +1,68 @@
>> +##
>> +# = Virtio devices
>> +##
>> +
>> +##
>> +# @VirtioType:
>> +#
>> +# An enumeration of Virtio device types.
>> +#
>> +# Since: 6.0
>> +##
>> +{ 'enum': 'VirtioType',
>> +  'data': [ 'unknown', 'virtio-9p', 'virtio-blk', 'virtio-serial',
>> +            'virtio-gpu', 'virtio-input', 'virtio-net', 'virtio-scsi',
>> +            'vhost-user-fs', 'vhost-vsock', 'virtio-balloon', 'virtio-crypto',
>> +            'virtio-iommu', 'virtio-pmem', 'virtio-rng' ]
> Can we make this be a complete list that's in the same order as include/standard-headers/linux/virtio_ids.h
> then if we add a few asserts somewhere to make sure we don't screwup, we
> don't need to do any translation.
>
> Dave

Hi Dave. Just so I understand correctly, you would like me to add all of the entries in the given order?
E.g. including 'virtio-rpmsg', ..., 'virtio-mac80211-wlan', etc.? Or just the supported virtio types in
the order as it's shown in virtio_ids.h?

Many of these devices may not be supported for introspection.

Jonah

>
>> +}
>> +
>> +##
>> +# @VirtioInfo:
>> +#
>> +# Information about a given VirtIODevice
>> +#
>> +# @path: VirtIO device canonical path.
>> +#
>> +# @type: VirtIO device type.
>> +#
>> +# Since: 6.0
>> +#
>> +##
>> +{ 'struct': 'VirtioInfo',
>> +  'data': {
>> +    'path': 'str',
>> +    'type': 'VirtioType'
>> +  }
>> +}
>> +
>> +##
>> +# @x-debug-query-virtio:
>> +#
>> +# Return the list of all VirtIO devices
>> +#
>> +# Returns: list of @VirtioInfo
>> +#
>> +# Since: 6.0
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "x-debug-query-virtio" }
>> +# <- { "return": [
>> +#        {
>> +#            "path": "/machine/peripheral-anon/device[3]/virtio-backend",
>> +#            "type": "virtio-net"
>> +#        },
>> +#        {
>> +#            "path": "/machine/peripheral-anon/device[1]/virtio-backend",
>> +#            "type": "virtio-serial"
>> +#        },
>> +#        {
>> +#            "path": "/machine/peripheral-anon/device[0]/virtio-backend",
>> +#            "type": "virtio-blk"
>> +#        }
>> +#      ]
>> +#    }
>> +#
>> +##
>> +
>> +{ 'command': 'x-debug-query-virtio', 'returns': ['VirtioInfo'] }
>> diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c
>> index 1c7186e..8f0ae20 100644
>> --- a/tests/qtest/qmp-cmd-test.c
>> +++ b/tests/qtest/qmp-cmd-test.c
>> @@ -95,6 +95,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-debug-query-virtio",   /* CONFIG_VIRTIO */
>>           /* Success depends on launching SEV guest */
>>           "query-sev-launch-measure",
>>           /* Success depends on Host or Hypervisor SEV support */
>> -- 
>> 1.8.3.1
>>

[-- Attachment #2: Type: text/html, Size: 3990 bytes --]

  reply	other threads:[~2021-06-02 10:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 16:29 [RFC v5 0/6] hmp,qmp: Add some commands to introspect virtio deices Jonah Palmer
2021-03-18 16:29 ` [RFC v5 1/6] qmp: add QMP command x-debug-query-virtio Jonah Palmer
2021-03-18 20:46   ` Eric Blake
2021-03-23  7:29     ` Jonah Palmer
2021-03-24 18:31   ` Dr. David Alan Gilbert
2021-06-02 10:23     ` Jonah Palmer [this message]
2021-06-02 11:28       ` Dr. David Alan Gilbert
2021-03-18 16:29 ` [RFC v5 2/6] qmp: add QMP command x-debug-virtio-status Jonah Palmer
2021-03-18 16:29 ` [RFC v5 3/6] qmp: decode feature bits in virtio-status Jonah Palmer
2021-03-18 16:29 ` [RFC v5 4/6] qmp: add QMP command x-debug-virtio-queue-status Jonah Palmer
2021-03-18 16:29 ` [RFC v5 5/6] qmp: add QMP command x-debug-virtio-queue-element Jonah Palmer
2021-03-18 16:29 ` [RFC v5 6/6] hmp: add virtio commands Jonah Palmer
2021-03-18 17:00 ` [RFC v5 0/6] hmp, qmp: Add some commands to introspect virtio deices no-reply

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=93c20860-a9bb-0565-a5cc-88525c6ee71e@oracle.com \
    --to=jonah.palmer@oracle.com \
    --cc=amit@kernel.org \
    --cc=armbru@redhat.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=dmitrii.stepanov@cloud.ionos.com \
    --cc=eric.auger@redhat.com \
    --cc=fam@euphon.net \
    --cc=jasowang@redhat.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --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 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.