All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, devel@lists.libvirt.org,
	Pierrick Bouvier <pierrick.bouvier@linaro.org>,
	Zhao Liu <zhao1.liu@intel.com>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH-for-11.0?] target/i386: Mandate monitor 'info lapic' take a vCPU ID argument
Date: Mon, 13 Apr 2026 14:19:01 +0100	[thread overview]
Message-ID: <adztRa80X42EGP4Y@redhat.com> (raw)
In-Reply-To: <20260413130748.6631-1-philmd@linaro.org>

On Mon, Apr 13, 2026 at 03:07:48PM +0200, Philippe Mathieu-Daudé wrote:
> With SMP configurations, using the 'current vCPU' under the
> monitor isn't recommended, as it changes during runtime. Better
> to specify which vCPU we want to monitor by its index. Deprecate
> the default of 'info lapic', mentioning an argument is expected,
> so we can remove this unpredictable behavior one day.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> The other command with this unpredictable behavior is 'info tlb'
> which we'll deal with differently, after the v11.0 release.

Aren't there quite a few more commands that rely on the HMP
"current" vCPU concept besides these two ?

info registers  comes to mind, 

There are others whic call mon_get_cpu(), which are not
directly caring about a specific CPU, eg 'info mem',
'memory_dump'

Why the rush to get lapic deprecated in 11.0 but not the
otherrs ?


> ---
>  docs/about/deprecated.rst | 6 ++++++
>  target/i386/cpu-apic.c    | 2 ++
>  hmp-commands-info.hx      | 3 +--
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index a6d6a713265..a62da93259a 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -169,6 +169,12 @@ The ``stopcapture`` command is deprecated and will be removed in a future releas
>  
>  The ``info capture`` command is deprecated and will be removed in a future release.
>  
> +``info lapic`` without ``apic-id`` argument (since 11.0)
> +''''''''''''''''''''''''''''''''''''''''''''''''''''''''
> +
> +When no APIC ID is provided, ``info lapic`` defaults to the current vCPU.
> +This behavior is now deprecated, the ID will be mandatory in a future release.
> +
>  Host Architectures
>  ------------------
>  
> diff --git a/target/i386/cpu-apic.c b/target/i386/cpu-apic.c
> index eaa10ad2a3d..9ca569f62b8 100644
> --- a/target/i386/cpu-apic.c
> +++ b/target/i386/cpu-apic.c
> @@ -97,6 +97,8 @@ void hmp_info_local_apic(Monitor *mon, const QDict *qdict)
>              cpu_synchronize_state(cs);
>          }
>      } else {
> +        monitor_printf(mon, "Not specifying the local apic id is deprecated"
> +                       " (using the current CPU one)\n");
>          cs = mon_get_cpu(mon);
>      }
>  
> diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
> index 74c741f80e2..e4206d329fc 100644
> --- a/hmp-commands-info.hx
> +++ b/hmp-commands-info.hx
> @@ -118,8 +118,7 @@ ERST
>          .name       = "lapic",
>          .args_type  = "apic-id:i?",
>          .params     = "[apic-id]",
> -        .help       = "show local apic state (apic-id: local apic to read, default is which of current CPU)",
> -
> +        .help       = "show local apic state (apic-id: local apic to read)",
>          .cmd        = hmp_info_local_apic,
>      },
>  #endif
> -- 
> 2.53.0
> 

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  reply	other threads:[~2026-04-13 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 13:07 [PATCH-for-11.0?] target/i386: Mandate monitor 'info lapic' take a vCPU ID argument Philippe Mathieu-Daudé
2026-04-13 13:19 ` Daniel P. Berrangé [this message]
2026-04-13 22:09   ` Philippe Mathieu-Daudé
2026-04-13 13:59 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adztRa80X42EGP4Y@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=devel@lists.libvirt.org \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.