]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Add --expand-cpu-features option for domcapabilities
authorJiri Denemark <jdenemar@redhat.com>
Wed, 11 Mar 2026 11:13:22 +0000 (12:13 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 11 Mar 2026 13:03:59 +0000 (14:03 +0100)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
docs/manpages/virsh.rst
tools/virsh-host.c

index b3e92898944afa12fc3c82d2b21b4de4930f9303..591c47a7ce95fe6fada80c126cf17c67621c026d 100644 (file)
@@ -592,6 +592,7 @@ domcapabilities
    domcapabilities [virttype] [emulatorbin] [arch] [machine]
                    [--xpath EXPRESSION] [--wrap]
                    [--disable-deprecated-features]
+                   [--expand-cpu-features]
 
 
 Print an XML document describing the domain capabilities for the
@@ -638,6 +639,10 @@ of host-model CPU XML, updating the features list with any features
 flagged as deprecated for the CPU model by the hypervisor. These
 features will be paired with the "disable" policy.
 
+The **--expand-cpu-features** option will cause the host-model CPU definition
+to contain all CPU features supported on the host including those implicitly
+enabled by the selected CPU model.
+
 
 pool-capabilities
 -----------------
index e918cfa4ca08a260486ca3af8a795cdfeb07fa10..dd98917fa88c1570c752697ee21a9b6e85c73c6b 100644 (file)
@@ -118,6 +118,10 @@ static const vshCmdOptDef opts_domcapabilities[] = {
      .type = VSH_OT_BOOL,
      .help = N_("report host CPU model with deprecated features disabled"),
     },
+    {.name = "expand-cpu-features",
+     .type = VSH_OT_BOOL,
+     .help = N_("show all features in host CPU model"),
+    },
     {.name = NULL}
 };
 
@@ -137,6 +141,9 @@ cmdDomCapabilities(vshControl *ctl, const vshCmd *cmd)
     if (vshCommandOptBool(cmd, "disable-deprecated-features"))
         flags |= VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES;
 
+    if (vshCommandOptBool(cmd, "expand-cpu-features"))
+        flags |= VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES;
+
     if (vshCommandOptString(ctl, cmd, "virttype", &virttype) < 0 ||
         vshCommandOptString(ctl, cmd, "emulatorbin", &emulatorbin) < 0 ||
         vshCommandOptString(ctl, cmd, "arch", &arch) < 0 ||