On Fri, May 29, 2026 at 16:12:17 +0200, Jiri Denemark via Devel wrote:
> From: Jiri Denemark <[email protected]>
> 
> The flag is designed for expanding the CPU model used by host-model. But
> the documentation was sometimes describing it as showing all CPU
> features supported on the host, which is wrong as the host may support
> features that would not be enabled in host-model.
> 
> Signed-off-by: Jiri Denemark <[email protected]>
> ---
> 
> Notes:
>     Version 2:
>     - v1 considered the flag name suboptimal and documentation talking about
>       supported features to be correct, but it appeared it was the other way
>       around... the documentation now always says the flag is only for
>       expanding the host CPU model
> 
>  docs/manpages/virsh.rst | 4 ++--
>  src/libvirt-domain.c    | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
> index d1901c82c2..f8318f6264 100644
> --- a/docs/manpages/virsh.rst
> +++ b/docs/manpages/virsh.rst
> @@ -640,8 +640,8 @@ 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.
> +to contain all required CPU features including those implicitly enabled by 
> the
> +selected CPU model.
>  
>  
>  pool-capabilities
> diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> index a4cbeb8ad4..425a73e75a 100644
> --- a/src/libvirt-domain.c
> +++ b/src/libvirt-domain.c
> @@ -12353,9 +12353,9 @@ virDomainSetUserPassword(virDomainPtr dom,
>   * passthrough and so on.
>   *
>   * 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.
> + * libvirt will explicitly list all CPU features that will be enabled for
> + * host-model CPU mode. Without this flag features that are part of the CPU
> + * model itself will not be listed.

Consider putting the 'Without ...' sentence also in the man page. That
one seems to be what clarifies it the most.

Reviewed-by: Peter Krempa <[email protected]>

Reply via email to