|
From: | Jonah Palmer |
Subject: | Re: [PATCH v6 1/6] qmp: add QMP command x-debug-query-virtio |
Date: | Tue, 10 Aug 2021 02:36:43 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
QAPI schema review only. Jonah Palmer <jonah.palmer@oracle.com> writes:From: Laurent Vivier <lvivier@redhat.com> This new command lists all the instances of VirtIODevice with their path and virtio type. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>[...]diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index 4912b97..0c89789 100644 --- a/qapi/qapi-schema.json +++ b/qapi/qapi-schema.json @@ -91,5 +91,6 @@ { 'include': 'misc.json' } { 'include': 'misc-target.json' } { 'include': 'audio.json' } +{ 'include': 'virtio.json' } { 'include': 'acpi.json' } { 'include': 'pci.json' } diff --git a/qapi/virtio.json b/qapi/virtio.json new file mode 100644 index 0000000..804adbe --- /dev/null +++ b/qapi/virtio.json @@ -0,0 +1,72 @@Please insert at the beginning # -*- Mode: Python -*- # vim: filetype=python #
Will do.
+## +# = Virtio devices +## + +## +# @VirtioType: +# +# An enumeration of Virtio device types. +# +# Since: 6.16.2 now, here and below.
Okay, will update for entire series.
+## +{ 'enum': 'VirtioType', + 'data': [ 'unknown', 'virtio-net', 'virtio-blk', 'virtio-console', + 'virtio-rng', 'virtio-balloon', 'virtio-iomem', 'virtio-rpmsg', + 'virtio-scsi', 'virtio-9p', 'virtio-mac80211-wlan', + 'virtio-serial', 'virtio-caif', 'virtio-memory-balloon', + 'unknown-14', 'unknown-15', 'virtio-gpu', 'virtio-clock', + 'virtio-input', 'vhost-vsock', 'virtio-crypto', 'virtio-signal-dist', + 'virtio-pstore', 'virtio-iommu', 'virtio-mem', 'unknown-25', + 'vhost-user-fs', 'virtio-pmem', 'unknown-28', 'virtio-mac80211-hwsim' ]Please limit line length to approximately 70 characters.
Fixed, sorry about that. Also, should I continue this up to 'virtio-bluetooth'? E.g: ... 'virtio-mac80211-hwsim', 'unknown-30', 'unknown-31', 'unknown-32', 'unknown-33', 'unknown-34', 'unknown-35', 'unknown-36', 'unknown-37', 'unknown-38', 'unknown-39', 'virtio-bluetooth' ]
+} + +## +# @VirtioInfo: +# +# Information about a given VirtIODevice +# +# @path: VirtIO device canonical path.Peeking ahead at the example, I conclude this is a QOM path. Please spell that out, e.g. "@path: the device's canonical QOM path".
Got it - will do for rest of occurrences in the series.
+# +# @type: VirtIO device type. +# +# Since: 6.1 +# +## +{ 'struct': 'VirtioInfo', + 'data': { + 'path': 'str', + 'type': 'VirtioType' + } +} + +## +# @x-debug-query-virtio: +# +# Return the list of all VirtIO devices +# +# Returns: list of @VirtioInfo +# +# Since: 6.1 +# +# 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'] }[...]
[Prev in Thread] | Current Thread | [Next in Thread] |