From: Jiri Denemark <[email protected]>

The flag is designed for showing all CPU features supported by the virt
stack. But the description was not really consistent in all places.

Signed-off-by: Jiri Denemark <[email protected]>
---
 docs/manpages/virsh.rst          | 4 +++-
 include/libvirt/libvirt-domain.h | 2 +-
 src/libvirt-domain.c             | 7 +++++--
 tools/virsh-host.c               | 2 +-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index d1901c82c2..8c445c685a 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -641,7 +641,9 @@ 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.
+enabled by the selected CPU model. The CPU definition may also contain extra
+features that are supported on the host, but should not be enabled by default
+when starting a domain with host-model CPU.
 
 
 pool-capabilities
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 8f07ef2156..b7b0b80318 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -1547,7 +1547,7 @@ int virDomainMigrateStartPostCopy(virDomainPtr domain,
 typedef enum {
     /* Report host model with deprecated features disabled. (Since: 11.0.0) */
     VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES = (1 << 0),
-    /* Report all host model CPU features. (Since: 12.2.0) */
+    /* Report all CPU features supported on the host. (Since: 12.2.0) */
     VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES = (1 << 1),
 } virConnectGetDomainCapabilitiesFlags;
 
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index a4cbeb8ad4..eeeb060f0d 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -12354,8 +12354,11 @@ virDomainSetUserPassword(virDomainPtr dom,
  *
  * If @flags includes VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES,
  * libvirt will explicitly list all CPU features (in host-model CPU definition)
- * that are supported on the host. Without this flag features that are part of
- * the CPU model itself will not be listed.
+ * that are supported on the host. Specifically, features that are normally
+ * hidden as included in the CPU model itself will be shown as well. The CPU
+ * definition may also contain extra features that are supported on the host,
+ * but should not be enabled by default when starting a domain with host-model
+ * CPU.
  *
  * Returns NULL in case of error or an XML string
  * defining the capabilities.
diff --git a/tools/virsh-host.c b/tools/virsh-host.c
index ef91e22fed..8f323cbd96 100644
--- a/tools/virsh-host.c
+++ b/tools/virsh-host.c
@@ -121,7 +121,7 @@ static const vshCmdOptDef opts_domcapabilities[] = {
     },
     {.name = "expand-cpu-features",
      .type = VSH_OT_BOOL,
-     .help = N_("show all features in host CPU model"),
+     .help = N_("show all supported features in host CPU model"),
     },
     {.name = NULL}
 };
-- 
2.54.0

Reply via email to