qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 1/6] qmp: add QMP command x-debug-query-virtio


From: Markus Armbruster
Subject: Re: [PATCH v6 1/6] qmp: add QMP command x-debug-query-virtio
Date: Sat, 07 Aug 2021 14:35:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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
   #

> +##
> +# = Virtio devices
> +##
> +
> +##
> +# @VirtioType:
> +#
> +# An enumeration of Virtio device types.
> +#
> +# Since: 6.1

6.2 now, here and below.

> +##
> +{ '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.

> +}
> +
> +##
> +# @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".

> +#
> +# @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'] }

[...]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]