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/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
> index 6aca1a626e..e24bf0d97b 100644
> --- a/hw/core/machine-qmp-cmds.c
> +++ b/hw/core/machine-qmp-cmds.c
> @@ -28,6 +28,20 @@
>  #include "system/runstate.h"
>  #include "system/system.h"
>  #include "hw/s390x/storage-keys.h"
> +#include <sys/stat.h>

I think this is left over from a previous version of the
patch that directly called stat() on the device node, and
can be removed.

> +
> +/*
> + * QMP query for MSHV
> + */
> +MshvInfo *qmp_query_mshv(Error **errp)
> +{
> +    MshvInfo *info = g_malloc0(sizeof(*info));
> +
> +    info->enabled = mshv_enabled();
> +    info->present = accel_find("mshv");
> +
> +    return info;
> +}
>  
>  /*
>   * fast means: we NEVER interrupt vCPU threads to retrieve


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 :|


Reply via email to