All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-for-11.0?] target/i386: Mandate monitor 'info lapic' take a vCPU ID argument
@ 2026-04-13 13:07 Philippe Mathieu-Daudé
  2026-04-13 13:19 ` Daniel P. Berrangé
  2026-04-13 13:59 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-04-13 13:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: devel, Pierrick Bouvier, Zhao Liu, Dr. David Alan Gilbert,
	Markus Armbruster, Paolo Bonzini, Philippe Mathieu-Daudé

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.
---
 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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-13 22:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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é
2026-04-13 22:09   ` Philippe Mathieu-Daudé
2026-04-13 13:59 ` Peter Maydell

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.