On Tue, Sep 16, 2025 at 06:48:44PM +0200, Magnus Kulke wrote:
> From: Praveen K Paladugu <[email protected]>
>
> Allow to query mshv capabilities via query-mshv QMP and info mshv HMP
> commands.
>
> Signed-off-by: Magnus Kulke <[email protected]>
> ---
> hmp-commands-info.hx | 13 +++++++++++++
> hw/core/machine-hmp-cmds.c | 15 +++++++++++++++
> hw/core/machine-qmp-cmds.c | 14 ++++++++++++++
> include/monitor/hmp.h | 1 +
> include/system/hw_accel.h | 1 +
> qapi/accelerator.json | 29 +++++++++++++++++++++++++++++
> 6 files changed, 73 insertions(+)
> diff --git a/qapi/accelerator.json b/qapi/accelerator.json
> index fb28c8d920..c2bfbc507f 100644
> --- a/qapi/accelerator.json
> +++ b/qapi/accelerator.json
> @@ -54,3 +54,32 @@
> { 'command': 'x-accel-stats',
> 'returns': 'HumanReadableText',
> 'features': [ 'unstable' ] }
> +
> +##
> +# @MshvInfo:
> +#
> +# Information about support for MSHV acceleration
> +#
> +# @enabled: true if MSHV acceleration is active
> +#
> +# @present: true if MSHV acceleration is built into this executable
> +#
> +# Since: 10.0.92
FYI, any time the last "miro" component is 50, it indicates
a development stream, and 90 onwards indicates a release candidate.
QAPI schema 'Since" tags shouldn't ever used those numbers, instead
when proposing patches, use the forthcoming GA release version which
will be a .0 in the micro component.
QEMU does three releases a year, and bumps the major version component
at the start of each year, and minor component for each release. The
micro component is always 0 for the first release, and then stable
branches bump micro.
We've just had 10.1.0, so the next release will be 10.2.0 and then
after that next year we'll be going to 11.0.0,
IOW for your patches, this should now be using 10.2.0 as that's the
next release available for merging
> +##
> +{ 'struct': 'MshvInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
> +
> +##
> +# @query-mshv:
> +#
> +# Return information about MSHV acceleration
> +#
> +# Returns: @MshvInfo
> +#
> +# Since: 10.0.92
> +#
> +# .. qmp-example::
> +#
> +# -> { "execute": "query-mshv" }
> +# <- { "return": { "enabled": true, "present": true } }
> +##
> +{ 'command': 'query-mshv', 'returns': 'MshvInfo' }
> --
> 2.34.1
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|