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 +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"), + }, {.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 || -- 2.54.0
