On Mon, Jan 05, 2026 at 11:43:09AM +0800, Bin Guo wrote:

Missing commit message explaining why we should do this ?

The 'hmp_info_kvm' implementation is unconditionally built and this patch
isn't changing that, so this result in building unused code.

Conceptually even if KVM is not built, it makes sense to have an
'info kvm' command to tell the user that KVM is not available.

> Signed-off-by: Bin Guo <[email protected]>
> ---
>  hmp-commands-info.hx | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
> index 41674dcbe1..1927649493 100644
> --- a/hmp-commands-info.hx
> +++ b/hmp-commands-info.hx
> @@ -294,6 +294,7 @@ SRST
>      being coalesced.
>  ERST
>  
> +#if defined(CONFIG_KVM)
>      {
>          .name       = "kvm",
>          .args_type  = "",
> @@ -301,6 +302,7 @@ ERST
>          .help       = "show KVM information",
>          .cmd        = hmp_info_kvm,
>      },
> +#endif
>  
>  SRST
>    ``info kvm``
> -- 
> 2.50.1 (Apple Git-155)
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to