On Fri, May 29, 2026 at 16:12:19 +0200, Jiri Denemark via Devel wrote:
> From: Jiri Denemark <[email protected]>
>
> The option corresponds to the
> VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES API flag.
>
> Signed-off-by: Jiri Denemark <[email protected]>
> ---
>
> Notes:
> Version 2:
> - new patch
>
> docs/manpages/virsh.rst | 8 +++++++-
> tools/virsh-host.c | 7 +++++++
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
> index f8318f6264..04d30ac674 100644
> --- a/docs/manpages/virsh.rst
> +++ b/docs/manpages/virsh.rst
> @@ -592,7 +592,7 @@ domcapabilities
> domcapabilities [virttype] [emulatorbin] [arch] [machine]
> [--xpath EXPRESSION] [--wrap]
> [--disable-deprecated-features]
> - [--expand-cpu-features]
> + [--expand-cpu-features] [--supported-cpu-features]
>
>
> Print an XML document describing the domain capabilities for the
> @@ -643,6 +643,12 @@ The **--expand-cpu-features** option will cause the
> host-model CPU definition
> to contain all required CPU features including those implicitly enabled by
> the
> selected CPU model.
>
> +The **--supported-cpu-features** option will update the host-model CPU
> +definition with features that are supported on the host, but should not be
Same issue as with previous patch. "should" => "would" is IMO what you
want to say here.
> +enabled by default when starting a domain with host-model CPU. Using both
> +**--supported-cpu-features** and **--expand-cpu-features** will provide a
> +complete list of features that can be enabled on the host.
> +
>
> pool-capabilities
> -----------------
> diff --git a/tools/virsh-host.c b/tools/virsh-host.c
> index ef91e22fed..e71dc21bf3 100644
> --- a/tools/virsh-host.c
> +++ b/tools/virsh-host.c
> @@ -123,6 +123,10 @@ static const vshCmdOptDef opts_domcapabilities[] = {
> .type = VSH_OT_BOOL,
> .help = N_("show all features in host CPU model"),
> },
> + {.name = "supported-cpu-features",
> + .type = VSH_OT_BOOL,
> + .help = N_("show supported CPU features in host model"),
This short help is IMO misleading, especially when compared to the one
above which documents --expand-cpu-features.
IMO --expand-cpu-features needs to be fixed to say something along:
show also CPU features assumed (or perhaps "included"?) in the CPU model
Then --supported-cpu-features should be more explicit taht it adds stuff
not enabled by default; e.g:
include all CPU features supported in 'host model' mode, not only those
enabled by default
> + },
> {.name = NULL}
> };
>
> @@ -145,6 +149,9 @@ cmdDomCapabilities(vshControl *ctl, const vshCmd *cmd)
> if (vshCommandOptBool(cmd, "expand-cpu-features"))
> flags |= VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES;
>
> + if (vshCommandOptBool(cmd, "supported-cpu-features"))
> + flags |= VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES;
> +
> if (vshCommandOptString(ctl, cmd, "virttype", &virttype) < 0 ||
> vshCommandOptString(ctl, cmd, "emulatorbin", &emulatorbin) < 0 ||
> vshCommandOptString(ctl, cmd, "arch", &arch) < 0 ||
With the wording clarified:
Reviewed-by: Peter Krempa <[email protected]>