All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Chris Wulff" <crwulff@gmail.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Bin Meng" <bin.meng@windriver.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Yuval Shaia" <yuval.shaia.ml@gmail.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Taylor Simpson" <tsimpson@quicinc.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Eric Blake" <eblake@redhat.com>, "Marek Vasut" <marex@denx.de>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Greg Kurz" <groug@kaod.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-s390x@nongnu.org, qemu-arm@nongnu.org,
	"Michael Rolnik" <mrolnik@gmail.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Stafford Horne" <shorne@gmail.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	qemu-riscv@nongnu.org,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-ppc@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>
Subject: [PATCH v2 38/53] qapi: introduce x-query-lapic QMP command
Date: Tue, 14 Sep 2021 15:20:27 +0100	[thread overview]
Message-ID: <20210914142042.1655100-39-berrange@redhat.com> (raw)
In-Reply-To: <20210914142042.1655100-1-berrange@redhat.com>

This is a counterpart to the HMP "info lapic" command. It is being
added with an "x-" prefix because this QMP command is intended as an
adhoc debugging tool and will thus not be modelled in QAPI as fully
structured data, nor will it have long term guaranteed stability.
The existing HMP command is rewritten to call the QMP command.

This command is unable to use the pre-existing HumanReadableText,
because if 'common.json' is included into 'machine-target.json'
the static marshalling method for HumanReadableText will be reported
as unused by the compiler on all architectures except s390x.

Possible options were

 1 Support 'if' conditionals on 'include' statements in QAPI
 2 Add further commands to 'machine-target.json' that use
   HumanReadableText, such that it has at least one usage
   on all architecture targets.
 3 Duplicate HumanReadableText as TargetHumanReadableText
   adding conditions

This patch takes option (3) in the belief that we will eventually
get to a point where option (2) happens, and TargetHumanReadableText
can be removed again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/core/cpu-common.c     |   7 ++
 include/hw/core/cpu.h    |  10 +++
 qapi/machine-target.json |  19 ++++-
 target/i386/cpu-dump.c   | 161 ++++++++++++++++++++-------------------
 target/i386/cpu.h        |   4 +-
 target/i386/monitor.c    |  46 +++++++++--
 6 files changed, 160 insertions(+), 87 deletions(-)

diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index c2cd33a817..d1ebc77d1b 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -49,6 +49,13 @@ CPUState *cpu_by_arch_id(int64_t id)
     return NULL;
 }
 
+int64_t cpu_get_arch_id(CPUState *cpu)
+{
+    CPUClass *cc = CPU_GET_CLASS(cpu);
+
+    return cc->get_arch_id(cpu);
+}
+
 bool cpu_exists(int64_t id)
 {
     return !!cpu_by_arch_id(id);
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 1599ef9df3..a0913eedaa 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -780,6 +780,16 @@ bool cpu_exists(int64_t id);
  */
 CPUState *cpu_by_arch_id(int64_t id);
 
+/**
+ * cpu_get_arch_id:
+ * @cpu: the CPU to query
+ *
+ * Get the guest exposed CPU ID for @cpu
+ *
+ * Returns: The guest exposed CPU ID
+ */
+int64_t cpu_get_arch_id(CPUState *cpu);
+
 /**
  * cpu_interrupt:
  * @cpu: The CPU to set an interrupt on.
diff --git a/qapi/machine-target.json b/qapi/machine-target.json
index 9040aff863..62220d1f08 100644
--- a/qapi/machine-target.json
+++ b/qapi/machine-target.json
@@ -353,7 +353,8 @@
 ##
 { 'struct': 'TargetHumanReadableText',
   'data': { 'human-readable-text': 'str' },
-  'if': 'TARGET_S390X' }
+  'if': { 'any': ['TARGET_S390X',
+                  'TARGET_I386' ] } }
 
 ##
 # @x-query-cmma:
@@ -369,6 +370,22 @@
   'returns': 'TargetHumanReadableText',
   'if': 'TARGET_S390X' }
 
+##
+# @x-query-lapic:
+#
+# @apic-id: the local APIC ID to report
+#
+# Query local APIC state.
+#
+# Returns: local APIC state
+#
+# Since: 6.2
+##
+{ 'command': 'x-query-lapic',
+  'data': { 'apic-id': 'int' },
+  'returns': 'TargetHumanReadableText',
+  'if': 'TARGET_I386' }
+
 ##
 # @x-query-skeys:
 #
diff --git a/target/i386/cpu-dump.c b/target/i386/cpu-dump.c
index f30fbcb76e..41a1f64138 100644
--- a/target/i386/cpu-dump.c
+++ b/target/i386/cpu-dump.c
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "qemu/qemu-print.h"
+#include "qapi/error.h"
 #ifndef CONFIG_USER_ONLY
 #include "hw/i386/apic_internal.h"
 #endif
@@ -179,24 +180,26 @@ static inline const char *dm2str(uint32_t dm)
     return str[dm];
 }
 
-static void dump_apic_lvt(const char *name, uint32_t lvt, bool is_timer)
+static void format_apic_lvt(const char *name, uint32_t lvt, bool is_timer,
+                            GString *buf)
 {
     uint32_t dm = (lvt & APIC_LVT_DELIV_MOD) >> APIC_LVT_DELIV_MOD_SHIFT;
-    qemu_printf("%s\t 0x%08x %s %-5s %-6s %-7s %-12s %-6s",
-                name, lvt,
-                lvt & APIC_LVT_INT_POLARITY ? "active-lo" : "active-hi",
-                lvt & APIC_LVT_LEVEL_TRIGGER ? "level" : "edge",
-                lvt & APIC_LVT_MASKED ? "masked" : "",
-                lvt & APIC_LVT_DELIV_STS ? "pending" : "",
-                !is_timer ?
-                    "" : lvt & APIC_LVT_TIMER_PERIODIC ?
-                            "periodic" : lvt & APIC_LVT_TIMER_TSCDEADLINE ?
-                                            "tsc-deadline" : "one-shot",
+    g_string_append_printf(buf, "%s\t 0x%08x %s %-5s %-6s %-7s %-12s %-6s",
+                           name, lvt,
+                           lvt & APIC_LVT_INT_POLARITY ?
+                           "active-lo" : "active-hi",
+                           lvt & APIC_LVT_LEVEL_TRIGGER ? "level" : "edge",
+                           lvt & APIC_LVT_MASKED ? "masked" : "",
+                           lvt & APIC_LVT_DELIV_STS ? "pending" : "",
+                           !is_timer ?
+                           "" : lvt & APIC_LVT_TIMER_PERIODIC ?
+                           "periodic" : lvt & APIC_LVT_TIMER_TSCDEADLINE ?
+                           "tsc-deadline" : "one-shot",
                 dm2str(dm));
     if (dm != APIC_DM_NMI) {
-        qemu_printf(" (vec %u)\n", lvt & APIC_VECTOR_MASK);
+        g_string_append_printf(buf, " (vec %u)\n", lvt & APIC_VECTOR_MASK);
     } else {
-        qemu_printf("\n");
+        g_string_append_printf(buf, "\n");
     }
 }
 
@@ -228,7 +231,7 @@ static inline void mask2str(char *str, uint32_t val, uint8_t size)
 
 #define MAX_LOGICAL_APIC_ID_MASK_SIZE 16
 
-static void dump_apic_icr(APICCommonState *s, CPUX86State *env)
+static void format_apic_icr(APICCommonState *s, CPUX86State *env, GString *buf)
 {
     uint32_t icr = s->icr[0], icr2 = s->icr[1];
     uint8_t dest_shorthand = \
@@ -238,16 +241,16 @@ static void dump_apic_icr(APICCommonState *s, CPUX86State *env)
     uint32_t dest_field;
     bool x2apic;
 
-    qemu_printf("ICR\t 0x%08x %s %s %s %s\n",
-                icr,
-                logical_mod ? "logical" : "physical",
-                icr & APIC_ICR_TRIGGER_MOD ? "level" : "edge",
-                icr & APIC_ICR_LEVEL ? "assert" : "de-assert",
-                shorthand2str(dest_shorthand));
+    g_string_append_printf(buf, "ICR\t 0x%08x %s %s %s %s\n",
+                           icr,
+                           logical_mod ? "logical" : "physical",
+                           icr & APIC_ICR_TRIGGER_MOD ? "level" : "edge",
+                           icr & APIC_ICR_LEVEL ? "assert" : "de-assert",
+                           shorthand2str(dest_shorthand));
 
-    qemu_printf("ICR2\t 0x%08x", icr2);
+    g_string_append_printf(buf, "ICR2\t 0x%08x", icr2);
     if (dest_shorthand != 0) {
-        qemu_printf("\n");
+        g_string_append_printf(buf, "\n");
         return;
     }
     x2apic = env->features[FEAT_1_ECX] & CPUID_EXT_X2APIC;
@@ -255,96 +258,100 @@ static void dump_apic_icr(APICCommonState *s, CPUX86State *env)
 
     if (!logical_mod) {
         if (x2apic) {
-            qemu_printf(" cpu %u (X2APIC ID)\n", dest_field);
+            g_string_append_printf(buf, " cpu %u (X2APIC ID)\n", dest_field);
         } else {
-            qemu_printf(" cpu %u (APIC ID)\n",
-                        dest_field & APIC_LOGDEST_XAPIC_ID);
+            g_string_append_printf(buf, " cpu %u (APIC ID)\n",
+                                   dest_field & APIC_LOGDEST_XAPIC_ID);
         }
         return;
     }
 
     if (s->dest_mode == 0xf) { /* flat mode */
         mask2str(apic_id_str, icr2 >> APIC_ICR_DEST_SHIFT, 8);
-        qemu_printf(" mask %s (APIC ID)\n", apic_id_str);
+        g_string_append_printf(buf, " mask %s (APIC ID)\n", apic_id_str);
     } else if (s->dest_mode == 0) { /* cluster mode */
         if (x2apic) {
             mask2str(apic_id_str, dest_field & APIC_LOGDEST_X2APIC_ID, 16);
-            qemu_printf(" cluster %u mask %s (X2APIC ID)\n",
-                        dest_field >> APIC_LOGDEST_X2APIC_SHIFT, apic_id_str);
+            g_string_append_printf(buf, " cluster %u mask %s (X2APIC ID)\n",
+                                   dest_field >> APIC_LOGDEST_X2APIC_SHIFT,
+                                   apic_id_str);
         } else {
             mask2str(apic_id_str, dest_field & APIC_LOGDEST_XAPIC_ID, 4);
-            qemu_printf(" cluster %u mask %s (APIC ID)\n",
-                        dest_field >> APIC_LOGDEST_XAPIC_SHIFT, apic_id_str);
+            g_string_append_printf(buf, " cluster %u mask %s (APIC ID)\n",
+                                   dest_field >> APIC_LOGDEST_XAPIC_SHIFT,
+                                   apic_id_str);
         }
     }
 }
 
-static void dump_apic_interrupt(const char *name, uint32_t *ireg_tab,
-                                uint32_t *tmr_tab)
+static void format_apic_interrupt(const char *name, uint32_t *ireg_tab,
+                                  uint32_t *tmr_tab, GString *buf)
 {
     int i, empty = true;
 
-    qemu_printf("%s\t ", name);
+    g_string_append_printf(buf, "%s\t ", name);
     for (i = 0; i < 256; i++) {
         if (apic_get_bit(ireg_tab, i)) {
-            qemu_printf("%u%s ", i,
-                        apic_get_bit(tmr_tab, i) ? "(level)" : "");
+            g_string_append_printf(buf, "%u%s ", i,
+                                   apic_get_bit(tmr_tab, i) ? "(level)" : "");
             empty = false;
         }
     }
-    qemu_printf("%s\n", empty ? "(none)" : "");
+    g_string_append_printf(buf, "%s\n", empty ? "(none)" : "");
 }
 
-void x86_cpu_dump_local_apic_state(CPUState *cs, int flags)
+GString *x86_cpu_format_local_apic_state(CPUState *cs, int flags, Error **errp)
 {
+    g_autoptr(GString) buf = g_string_new("");
     X86CPU *cpu = X86_CPU(cs);
     APICCommonState *s = APIC_COMMON(cpu->apic_state);
     if (!s) {
-        qemu_printf("local apic state not available\n");
-        return;
+        error_setg(errp, "local apic state not available");
+        return NULL;
     }
     uint32_t *lvt = s->lvt;
 
-    qemu_printf("dumping local APIC state for CPU %-2u\n\n",
-                CPU(cpu)->cpu_index);
-    dump_apic_lvt("LVT0", lvt[APIC_LVT_LINT0], false);
-    dump_apic_lvt("LVT1", lvt[APIC_LVT_LINT1], false);
-    dump_apic_lvt("LVTPC", lvt[APIC_LVT_PERFORM], false);
-    dump_apic_lvt("LVTERR", lvt[APIC_LVT_ERROR], false);
-    dump_apic_lvt("LVTTHMR", lvt[APIC_LVT_THERMAL], false);
-    dump_apic_lvt("LVTT", lvt[APIC_LVT_TIMER], true);
-
-    qemu_printf("Timer\t DCR=0x%x (divide by %u) initial_count = %u"
-                " current_count = %u\n",
-                s->divide_conf & APIC_DCR_MASK,
-                divider_conf(s->divide_conf),
-                s->initial_count, apic_get_current_count(s));
-
-    qemu_printf("SPIV\t 0x%08x APIC %s, focus=%s, spurious vec %u\n",
-                s->spurious_vec,
-                s->spurious_vec & APIC_SPURIO_ENABLED ? "enabled" : "disabled",
-                s->spurious_vec & APIC_SPURIO_FOCUS ? "on" : "off",
-                s->spurious_vec & APIC_VECTOR_MASK);
-
-    dump_apic_icr(s, &cpu->env);
-
-    qemu_printf("ESR\t 0x%08x\n", s->esr);
-
-    dump_apic_interrupt("ISR", s->isr, s->tmr);
-    dump_apic_interrupt("IRR", s->irr, s->tmr);
-
-    qemu_printf("\nAPR 0x%02x TPR 0x%02x DFR 0x%02x LDR 0x%02x",
-                s->arb_id, s->tpr, s->dest_mode, s->log_dest);
+    g_string_append_printf(buf, "dumping local APIC state for CPU %-2u\n\n",
+                           CPU(cpu)->cpu_index);
+    format_apic_lvt("LVT0", lvt[APIC_LVT_LINT0], false, buf);
+    format_apic_lvt("LVT1", lvt[APIC_LVT_LINT1], false, buf);
+    format_apic_lvt("LVTPC", lvt[APIC_LVT_PERFORM], false, buf);
+    format_apic_lvt("LVTERR", lvt[APIC_LVT_ERROR], false, buf);
+    format_apic_lvt("LVTTHMR", lvt[APIC_LVT_THERMAL], false, buf);
+    format_apic_lvt("LVTT", lvt[APIC_LVT_TIMER], true, buf);
+
+    g_string_append_printf(buf,
+                           "Timer\t DCR=0x%x (divide by %u) initial_count = %u"
+                           " current_count = %u\n",
+                           s->divide_conf & APIC_DCR_MASK,
+                           divider_conf(s->divide_conf),
+                           s->initial_count, apic_get_current_count(s));
+
+    g_string_append_printf(buf,
+                           "SPIV\t 0x%08x APIC %s, focus=%s, spurious vec %u\n",
+                           s->spurious_vec,
+                           s->spurious_vec & APIC_SPURIO_ENABLED ?
+                           "enabled" : "disabled",
+                           s->spurious_vec & APIC_SPURIO_FOCUS ? "on" : "off",
+                           s->spurious_vec & APIC_VECTOR_MASK);
+
+    format_apic_icr(s, &cpu->env, buf);
+
+    g_string_append_printf(buf, "ESR\t 0x%08x\n", s->esr);
+
+    format_apic_interrupt("ISR", s->isr, s->tmr, buf);
+    format_apic_interrupt("IRR", s->irr, s->tmr, buf);
+
+    g_string_append_printf(buf, "\nAPR 0x%02x TPR 0x%02x DFR 0x%02x LDR 0x%02x",
+                           s->arb_id, s->tpr, s->dest_mode, s->log_dest);
     if (s->dest_mode == 0) {
-        qemu_printf("(cluster %u: id %u)",
-                    s->log_dest >> APIC_LOGDEST_XAPIC_SHIFT,
-                    s->log_dest & APIC_LOGDEST_XAPIC_ID);
+        g_string_append_printf(buf, "(cluster %u: id %u)",
+                               s->log_dest >> APIC_LOGDEST_XAPIC_SHIFT,
+                               s->log_dest & APIC_LOGDEST_XAPIC_ID);
     }
-    qemu_printf(" PPR 0x%02x\n", apic_get_ppr(s));
-}
-#else
-void x86_cpu_dump_local_apic_state(CPUState *cs, int flags)
-{
+    g_string_append_printf(buf, " PPR 0x%02x\n", apic_get_ppr(s));
+
+    return g_steal_pointer(&buf);
 }
 #endif /* !CONFIG_USER_ONLY */
 
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index d87c8808f6..2bcb175da8 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -2201,8 +2201,10 @@ void x86_cpu_set_default_version(X86CPUVersion version);
 #define APIC_DEFAULT_ADDRESS 0xfee00000
 #define APIC_SPACE_SIZE      0x100000
 
+#ifndef CONFIG_USER_ONLY
 /* cpu-dump.c */
-void x86_cpu_dump_local_apic_state(CPUState *cs, int flags);
+GString *x86_cpu_format_local_apic_state(CPUState *cs, int flags, Error **errp);
+#endif /* !CONFIG_USER_ONLY */
 
 /* cpu.c */
 bool cpu_is_bsp(X86CPU *cpu);
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 19468c4e85..fc09f90059 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -33,6 +33,7 @@
 #include "qapi/error.h"
 #include "sev_i386.h"
 #include "qapi/qapi-commands-misc-target.h"
+#include "qapi/qapi-commands-machine-target.h"
 #include "qapi/qapi-commands-misc.h"
 #include "hw/i386/pc.h"
 
@@ -650,23 +651,52 @@ const MonitorDef *target_monitor_defs(void)
     return monitor_defs;
 }
 
+TargetHumanReadableText *qmp_x_query_lapic(int64_t apicid,
+                                           Error **errp)
+{
+    TargetHumanReadableText *ret;
+    g_autoptr(GString) buf = NULL;
+    CPUState *cs = cpu_by_arch_id(apicid);
+
+    if (!cs) {
+        error_setg(errp, "No CPU with APIC ID %" PRId64 " available", apicid);
+        return NULL;
+    }
+
+    buf = x86_cpu_format_local_apic_state(cs, CPU_DUMP_FPU, errp);
+    if (!buf) {
+        return NULL;
+    }
+
+    ret = g_new0(TargetHumanReadableText, 1);
+    ret->human_readable_text = g_steal_pointer(&buf->str);
+    return ret;
+}
+
 void hmp_info_local_apic(Monitor *mon, const QDict *qdict)
 {
-    CPUState *cs;
+    Error *err = NULL;
+    g_autoptr(TargetHumanReadableText) info = NULL;
+    int64_t apicid;
 
     if (qdict_haskey(qdict, "apic-id")) {
-        int id = qdict_get_try_int(qdict, "apic-id", 0);
-        cs = cpu_by_arch_id(id);
+        apicid = qdict_get_try_int(qdict, "apic-id", 0);
     } else {
-        cs = mon_get_cpu(mon);
+        CPUState *cs = mon_get_cpu(mon);
+        if (!cs) {
+            monitor_printf(mon, "No CPU available\n");
+            return;
+        }
+        apicid = cpu_get_arch_id(cs);
     }
 
-
-    if (!cs) {
-        monitor_printf(mon, "No CPU available\n");
+    info = qmp_x_query_lapic(apicid, &err);
+    if (err) {
+        error_report_err(err);
         return;
     }
-    x86_cpu_dump_local_apic_state(cs, CPU_DUMP_FPU);
+
+    monitor_printf(mon, "%s", info->human_readable_text);
 }
 
 SevInfo *qmp_query_sev(Error **errp)
-- 
2.31.1



WARNING: multiple messages have this Message-ID (diff)
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Greg Kurz" <groug@kaod.org>, "Bin Meng" <bin.meng@windriver.com>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Stafford Horne" <shorne@gmail.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	qemu-ppc@nongnu.org,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-arm@nongnu.org, "Michael Rolnik" <mrolnik@gmail.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Taylor Simpson" <tsimpson@quicinc.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	qemu-riscv@nongnu.org, "Max Filippov" <jcmvbkbc@gmail.com>,
	"Yuval Shaia" <yuval.shaia.ml@gmail.com>,
	"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Aleksandar Rikalo" <aleksandar.rikalo@syrmia.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Marek Vasut" <marex@denx.de>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	qemu-s390x@nongnu.org, "Laurent Vivier" <lvivier@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Chris Wulff" <crwulff@gmail.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH v2 38/53] qapi: introduce x-query-lapic QMP command
Date: Tue, 14 Sep 2021 15:20:27 +0100	[thread overview]
Message-ID: <20210914142042.1655100-39-berrange@redhat.com> (raw)
In-Reply-To: <20210914142042.1655100-1-berrange@redhat.com>

This is a counterpart to the HMP "info lapic" command. It is being
added with an "x-" prefix because this QMP command is intended as an
adhoc debugging tool and will thus not be modelled in QAPI as fully
structured data, nor will it have long term guaranteed stability.
The existing HMP command is rewritten to call the QMP command.

This command is unable to use the pre-existing HumanReadableText,
because if 'common.json' is included into 'machine-target.json'
the static marshalling method for HumanReadableText will be reported
as unused by the compiler on all architectures except s390x.

Possible options were

 1 Support 'if' conditionals on 'include' statements in QAPI
 2 Add further commands to 'machine-target.json' that use
   HumanReadableText, such that it has at least one usage
   on all architecture targets.
 3 Duplicate HumanReadableText as TargetHumanReadableText
   adding conditions

This patch takes option (3) in the belief that we will eventually
get to a point where option (2) happens, and TargetHumanReadableText
can be removed again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/core/cpu-common.c     |   7 ++
 include/hw/core/cpu.h    |  10 +++
 qapi/machine-target.json |  19 ++++-
 target/i386/cpu-dump.c   | 161 ++++++++++++++++++++-------------------
 target/i386/cpu.h        |   4 +-
 target/i386/monitor.c    |  46 +++++++++--
 6 files changed, 160 insertions(+), 87 deletions(-)

diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index c2cd33a817..d1ebc77d1b 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -49,6 +49,13 @@ CPUState *cpu_by_arch_id(int64_t id)
     return NULL;
 }
 
+int64_t cpu_get_arch_id(CPUState *cpu)
+{
+    CPUClass *cc = CPU_GET_CLASS(cpu);
+
+    return cc->get_arch_id(cpu);
+}
+
 bool cpu_exists(int64_t id)
 {
     return !!cpu_by_arch_id(id);
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 1599ef9df3..a0913eedaa 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -780,6 +780,16 @@ bool cpu_exists(int64_t id);
  */
 CPUState *cpu_by_arch_id(int64_t id);
 
+/**
+ * cpu_get_arch_id:
+ * @cpu: the CPU to query
+ *
+ * Get the guest exposed CPU ID for @cpu
+ *
+ * Returns: The guest exposed CPU ID
+ */
+int64_t cpu_get_arch_id(CPUState *cpu);
+
 /**
  * cpu_interrupt:
  * @cpu: The CPU to set an interrupt on.
diff --git a/qapi/machine-target.json b/qapi/machine-target.json
index 9040aff863..62220d1f08 100644
--- a/qapi/machine-target.json
+++ b/qapi/machine-target.json
@@ -353,7 +353,8 @@
 ##
 { 'struct': 'TargetHumanReadableText',
   'data': { 'human-readable-text': 'str' },
-  'if': 'TARGET_S390X' }
+  'if': { 'any': ['TARGET_S390X',
+                  'TARGET_I386' ] } }
 
 ##
 # @x-query-cmma:
@@ -369,6 +370,22 @@
   'returns': 'TargetHumanReadableText',
   'if': 'TARGET_S390X' }
 
+##
+# @x-query-lapic:
+#
+# @apic-id: the local APIC ID to report
+#
+# Query local APIC state.
+#
+# Returns: local APIC state
+#
+# Since: 6.2
+##
+{ 'command': 'x-query-lapic',
+  'data': { 'apic-id': 'int' },
+  'returns': 'TargetHumanReadableText',
+  'if': 'TARGET_I386' }
+
 ##
 # @x-query-skeys:
 #
diff --git a/target/i386/cpu-dump.c b/target/i386/cpu-dump.c
index f30fbcb76e..41a1f64138 100644
--- a/target/i386/cpu-dump.c
+++ b/target/i386/cpu-dump.c
@@ -20,6 +20,7 @@
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "qemu/qemu-print.h"
+#include "qapi/error.h"
 #ifndef CONFIG_USER_ONLY
 #include "hw/i386/apic_internal.h"
 #endif
@@ -179,24 +180,26 @@ static inline const char *dm2str(uint32_t dm)
     return str[dm];
 }
 
-static void dump_apic_lvt(const char *name, uint32_t lvt, bool is_timer)
+static void format_apic_lvt(const char *name, uint32_t lvt, bool is_timer,
+                            GString *buf)
 {
     uint32_t dm = (lvt & APIC_LVT_DELIV_MOD) >> APIC_LVT_DELIV_MOD_SHIFT;
-    qemu_printf("%s\t 0x%08x %s %-5s %-6s %-7s %-12s %-6s",
-                name, lvt,
-                lvt & APIC_LVT_INT_POLARITY ? "active-lo" : "active-hi",
-                lvt & APIC_LVT_LEVEL_TRIGGER ? "level" : "edge",
-                lvt & APIC_LVT_MASKED ? "masked" : "",
-                lvt & APIC_LVT_DELIV_STS ? "pending" : "",
-                !is_timer ?
-                    "" : lvt & APIC_LVT_TIMER_PERIODIC ?
-                            "periodic" : lvt & APIC_LVT_TIMER_TSCDEADLINE ?
-                                            "tsc-deadline" : "one-shot",
+    g_string_append_printf(buf, "%s\t 0x%08x %s %-5s %-6s %-7s %-12s %-6s",
+                           name, lvt,
+                           lvt & APIC_LVT_INT_POLARITY ?
+                           "active-lo" : "active-hi",
+                           lvt & APIC_LVT_LEVEL_TRIGGER ? "level" : "edge",
+                           lvt & APIC_LVT_MASKED ? "masked" : "",
+                           lvt & APIC_LVT_DELIV_STS ? "pending" : "",
+                           !is_timer ?
+                           "" : lvt & APIC_LVT_TIMER_PERIODIC ?
+                           "periodic" : lvt & APIC_LVT_TIMER_TSCDEADLINE ?
+                           "tsc-deadline" : "one-shot",
                 dm2str(dm));
     if (dm != APIC_DM_NMI) {
-        qemu_printf(" (vec %u)\n", lvt & APIC_VECTOR_MASK);
+        g_string_append_printf(buf, " (vec %u)\n", lvt & APIC_VECTOR_MASK);
     } else {
-        qemu_printf("\n");
+        g_string_append_printf(buf, "\n");
     }
 }
 
@@ -228,7 +231,7 @@ static inline void mask2str(char *str, uint32_t val, uint8_t size)
 
 #define MAX_LOGICAL_APIC_ID_MASK_SIZE 16
 
-static void dump_apic_icr(APICCommonState *s, CPUX86State *env)
+static void format_apic_icr(APICCommonState *s, CPUX86State *env, GString *buf)
 {
     uint32_t icr = s->icr[0], icr2 = s->icr[1];
     uint8_t dest_shorthand = \
@@ -238,16 +241,16 @@ static void dump_apic_icr(APICCommonState *s, CPUX86State *env)
     uint32_t dest_field;
     bool x2apic;
 
-    qemu_printf("ICR\t 0x%08x %s %s %s %s\n",
-                icr,
-                logical_mod ? "logical" : "physical",
-                icr & APIC_ICR_TRIGGER_MOD ? "level" : "edge",
-                icr & APIC_ICR_LEVEL ? "assert" : "de-assert",
-                shorthand2str(dest_shorthand));
+    g_string_append_printf(buf, "ICR\t 0x%08x %s %s %s %s\n",
+                           icr,
+                           logical_mod ? "logical" : "physical",
+                           icr & APIC_ICR_TRIGGER_MOD ? "level" : "edge",
+                           icr & APIC_ICR_LEVEL ? "assert" : "de-assert",
+                           shorthand2str(dest_shorthand));
 
-    qemu_printf("ICR2\t 0x%08x", icr2);
+    g_string_append_printf(buf, "ICR2\t 0x%08x", icr2);
     if (dest_shorthand != 0) {
-        qemu_printf("\n");
+        g_string_append_printf(buf, "\n");
         return;
     }
     x2apic = env->features[FEAT_1_ECX] & CPUID_EXT_X2APIC;
@@ -255,96 +258,100 @@ static void dump_apic_icr(APICCommonState *s, CPUX86State *env)
 
     if (!logical_mod) {
         if (x2apic) {
-            qemu_printf(" cpu %u (X2APIC ID)\n", dest_field);
+            g_string_append_printf(buf, " cpu %u (X2APIC ID)\n", dest_field);
         } else {
-            qemu_printf(" cpu %u (APIC ID)\n",
-                        dest_field & APIC_LOGDEST_XAPIC_ID);
+            g_string_append_printf(buf, " cpu %u (APIC ID)\n",
+                                   dest_field & APIC_LOGDEST_XAPIC_ID);
         }
         return;
     }
 
     if (s->dest_mode == 0xf) { /* flat mode */
         mask2str(apic_id_str, icr2 >> APIC_ICR_DEST_SHIFT, 8);
-        qemu_printf(" mask %s (APIC ID)\n", apic_id_str);
+        g_string_append_printf(buf, " mask %s (APIC ID)\n", apic_id_str);
     } else if (s->dest_mode == 0) { /* cluster mode */
         if (x2apic) {
             mask2str(apic_id_str, dest_field & APIC_LOGDEST_X2APIC_ID, 16);
-            qemu_printf(" cluster %u mask %s (X2APIC ID)\n",
-                        dest_field >> APIC_LOGDEST_X2APIC_SHIFT, apic_id_str);
+            g_string_append_printf(buf, " cluster %u mask %s (X2APIC ID)\n",
+                                   dest_field >> APIC_LOGDEST_X2APIC_SHIFT,
+                                   apic_id_str);
         } else {
             mask2str(apic_id_str, dest_field & APIC_LOGDEST_XAPIC_ID, 4);
-            qemu_printf(" cluster %u mask %s (APIC ID)\n",
-                        dest_field >> APIC_LOGDEST_XAPIC_SHIFT, apic_id_str);
+            g_string_append_printf(buf, " cluster %u mask %s (APIC ID)\n",
+                                   dest_field >> APIC_LOGDEST_XAPIC_SHIFT,
+                                   apic_id_str);
         }
     }
 }
 
-static void dump_apic_interrupt(const char *name, uint32_t *ireg_tab,
-                                uint32_t *tmr_tab)
+static void format_apic_interrupt(const char *name, uint32_t *ireg_tab,
+                                  uint32_t *tmr_tab, GString *buf)
 {
     int i, empty = true;
 
-    qemu_printf("%s\t ", name);
+    g_string_append_printf(buf, "%s\t ", name);
     for (i = 0; i < 256; i++) {
         if (apic_get_bit(ireg_tab, i)) {
-            qemu_printf("%u%s ", i,
-                        apic_get_bit(tmr_tab, i) ? "(level)" : "");
+            g_string_append_printf(buf, "%u%s ", i,
+                                   apic_get_bit(tmr_tab, i) ? "(level)" : "");
             empty = false;
         }
     }
-    qemu_printf("%s\n", empty ? "(none)" : "");
+    g_string_append_printf(buf, "%s\n", empty ? "(none)" : "");
 }
 
-void x86_cpu_dump_local_apic_state(CPUState *cs, int flags)
+GString *x86_cpu_format_local_apic_state(CPUState *cs, int flags, Error **errp)
 {
+    g_autoptr(GString) buf = g_string_new("");
     X86CPU *cpu = X86_CPU(cs);
     APICCommonState *s = APIC_COMMON(cpu->apic_state);
     if (!s) {
-        qemu_printf("local apic state not available\n");
-        return;
+        error_setg(errp, "local apic state not available");
+        return NULL;
     }
     uint32_t *lvt = s->lvt;
 
-    qemu_printf("dumping local APIC state for CPU %-2u\n\n",
-                CPU(cpu)->cpu_index);
-    dump_apic_lvt("LVT0", lvt[APIC_LVT_LINT0], false);
-    dump_apic_lvt("LVT1", lvt[APIC_LVT_LINT1], false);
-    dump_apic_lvt("LVTPC", lvt[APIC_LVT_PERFORM], false);
-    dump_apic_lvt("LVTERR", lvt[APIC_LVT_ERROR], false);
-    dump_apic_lvt("LVTTHMR", lvt[APIC_LVT_THERMAL], false);
-    dump_apic_lvt("LVTT", lvt[APIC_LVT_TIMER], true);
-
-    qemu_printf("Timer\t DCR=0x%x (divide by %u) initial_count = %u"
-                " current_count = %u\n",
-                s->divide_conf & APIC_DCR_MASK,
-                divider_conf(s->divide_conf),
-                s->initial_count, apic_get_current_count(s));
-
-    qemu_printf("SPIV\t 0x%08x APIC %s, focus=%s, spurious vec %u\n",
-                s->spurious_vec,
-                s->spurious_vec & APIC_SPURIO_ENABLED ? "enabled" : "disabled",
-                s->spurious_vec & APIC_SPURIO_FOCUS ? "on" : "off",
-                s->spurious_vec & APIC_VECTOR_MASK);
-
-    dump_apic_icr(s, &cpu->env);
-
-    qemu_printf("ESR\t 0x%08x\n", s->esr);
-
-    dump_apic_interrupt("ISR", s->isr, s->tmr);
-    dump_apic_interrupt("IRR", s->irr, s->tmr);
-
-    qemu_printf("\nAPR 0x%02x TPR 0x%02x DFR 0x%02x LDR 0x%02x",
-                s->arb_id, s->tpr, s->dest_mode, s->log_dest);
+    g_string_append_printf(buf, "dumping local APIC state for CPU %-2u\n\n",
+                           CPU(cpu)->cpu_index);
+    format_apic_lvt("LVT0", lvt[APIC_LVT_LINT0], false, buf);
+    format_apic_lvt("LVT1", lvt[APIC_LVT_LINT1], false, buf);
+    format_apic_lvt("LVTPC", lvt[APIC_LVT_PERFORM], false, buf);
+    format_apic_lvt("LVTERR", lvt[APIC_LVT_ERROR], false, buf);
+    format_apic_lvt("LVTTHMR", lvt[APIC_LVT_THERMAL], false, buf);
+    format_apic_lvt("LVTT", lvt[APIC_LVT_TIMER], true, buf);
+
+    g_string_append_printf(buf,
+                           "Timer\t DCR=0x%x (divide by %u) initial_count = %u"
+                           " current_count = %u\n",
+                           s->divide_conf & APIC_DCR_MASK,
+                           divider_conf(s->divide_conf),
+                           s->initial_count, apic_get_current_count(s));
+
+    g_string_append_printf(buf,
+                           "SPIV\t 0x%08x APIC %s, focus=%s, spurious vec %u\n",
+                           s->spurious_vec,
+                           s->spurious_vec & APIC_SPURIO_ENABLED ?
+                           "enabled" : "disabled",
+                           s->spurious_vec & APIC_SPURIO_FOCUS ? "on" : "off",
+                           s->spurious_vec & APIC_VECTOR_MASK);
+
+    format_apic_icr(s, &cpu->env, buf);
+
+    g_string_append_printf(buf, "ESR\t 0x%08x\n", s->esr);
+
+    format_apic_interrupt("ISR", s->isr, s->tmr, buf);
+    format_apic_interrupt("IRR", s->irr, s->tmr, buf);
+
+    g_string_append_printf(buf, "\nAPR 0x%02x TPR 0x%02x DFR 0x%02x LDR 0x%02x",
+                           s->arb_id, s->tpr, s->dest_mode, s->log_dest);
     if (s->dest_mode == 0) {
-        qemu_printf("(cluster %u: id %u)",
-                    s->log_dest >> APIC_LOGDEST_XAPIC_SHIFT,
-                    s->log_dest & APIC_LOGDEST_XAPIC_ID);
+        g_string_append_printf(buf, "(cluster %u: id %u)",
+                               s->log_dest >> APIC_LOGDEST_XAPIC_SHIFT,
+                               s->log_dest & APIC_LOGDEST_XAPIC_ID);
     }
-    qemu_printf(" PPR 0x%02x\n", apic_get_ppr(s));
-}
-#else
-void x86_cpu_dump_local_apic_state(CPUState *cs, int flags)
-{
+    g_string_append_printf(buf, " PPR 0x%02x\n", apic_get_ppr(s));
+
+    return g_steal_pointer(&buf);
 }
 #endif /* !CONFIG_USER_ONLY */
 
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index d87c8808f6..2bcb175da8 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -2201,8 +2201,10 @@ void x86_cpu_set_default_version(X86CPUVersion version);
 #define APIC_DEFAULT_ADDRESS 0xfee00000
 #define APIC_SPACE_SIZE      0x100000
 
+#ifndef CONFIG_USER_ONLY
 /* cpu-dump.c */
-void x86_cpu_dump_local_apic_state(CPUState *cs, int flags);
+GString *x86_cpu_format_local_apic_state(CPUState *cs, int flags, Error **errp);
+#endif /* !CONFIG_USER_ONLY */
 
 /* cpu.c */
 bool cpu_is_bsp(X86CPU *cpu);
diff --git a/target/i386/monitor.c b/target/i386/monitor.c
index 19468c4e85..fc09f90059 100644
--- a/target/i386/monitor.c
+++ b/target/i386/monitor.c
@@ -33,6 +33,7 @@
 #include "qapi/error.h"
 #include "sev_i386.h"
 #include "qapi/qapi-commands-misc-target.h"
+#include "qapi/qapi-commands-machine-target.h"
 #include "qapi/qapi-commands-misc.h"
 #include "hw/i386/pc.h"
 
@@ -650,23 +651,52 @@ const MonitorDef *target_monitor_defs(void)
     return monitor_defs;
 }
 
+TargetHumanReadableText *qmp_x_query_lapic(int64_t apicid,
+                                           Error **errp)
+{
+    TargetHumanReadableText *ret;
+    g_autoptr(GString) buf = NULL;
+    CPUState *cs = cpu_by_arch_id(apicid);
+
+    if (!cs) {
+        error_setg(errp, "No CPU with APIC ID %" PRId64 " available", apicid);
+        return NULL;
+    }
+
+    buf = x86_cpu_format_local_apic_state(cs, CPU_DUMP_FPU, errp);
+    if (!buf) {
+        return NULL;
+    }
+
+    ret = g_new0(TargetHumanReadableText, 1);
+    ret->human_readable_text = g_steal_pointer(&buf->str);
+    return ret;
+}
+
 void hmp_info_local_apic(Monitor *mon, const QDict *qdict)
 {
-    CPUState *cs;
+    Error *err = NULL;
+    g_autoptr(TargetHumanReadableText) info = NULL;
+    int64_t apicid;
 
     if (qdict_haskey(qdict, "apic-id")) {
-        int id = qdict_get_try_int(qdict, "apic-id", 0);
-        cs = cpu_by_arch_id(id);
+        apicid = qdict_get_try_int(qdict, "apic-id", 0);
     } else {
-        cs = mon_get_cpu(mon);
+        CPUState *cs = mon_get_cpu(mon);
+        if (!cs) {
+            monitor_printf(mon, "No CPU available\n");
+            return;
+        }
+        apicid = cpu_get_arch_id(cs);
     }
 
-
-    if (!cs) {
-        monitor_printf(mon, "No CPU available\n");
+    info = qmp_x_query_lapic(apicid, &err);
+    if (err) {
+        error_report_err(err);
         return;
     }
-    x86_cpu_dump_local_apic_state(cs, CPU_DUMP_FPU);
+
+    monitor_printf(mon, "%s", info->human_readable_text);
 }
 
 SevInfo *qmp_query_sev(Error **errp)
-- 
2.31.1



  parent reply	other threads:[~2021-09-14 15:05 UTC|newest]

Thread overview: 216+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 14:19 [PATCH v2 00/53] monitor: explicitly permit QMP commands to be added for all use cases Daniel P. Berrangé
2021-09-14 14:19 ` Daniel P. Berrangé
2021-09-14 14:19 ` [PATCH v2 01/53] docs/devel: rename file for writing monitor commands Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-20  7:42   ` Markus Armbruster
2021-09-20  7:42     ` Markus Armbruster
2021-09-22 16:02     ` Daniel P. Berrangé
2021-09-22 16:02       ` Daniel P. Berrangé
2021-09-14 14:19 ` [PATCH v2 02/53] docs/devel: tweak headings in monitor command docs Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-20  7:42   ` Markus Armbruster
2021-09-20  7:42     ` Markus Armbruster
2021-09-14 14:19 ` [PATCH v2 03/53] docs/devel: document expectations for QAPI data modelling for QMP Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-20  7:44   ` Markus Armbruster
2021-09-20  7:44     ` Markus Armbruster
2021-09-14 14:19 ` [PATCH v2 04/53] docs/devel: add example of command returning unstructured text Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-20  7:51   ` Markus Armbruster
2021-09-20  7:51     ` Markus Armbruster
2021-09-14 14:19 ` [PATCH v2 05/53] docs/devel: document expectations for HMP commands in the future Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-20  8:06   ` Markus Armbruster
2021-09-20  8:06     ` Markus Armbruster
2021-09-22 16:14     ` Daniel P. Berrangé
2021-09-22 16:14       ` Daniel P. Berrangé
2021-09-14 14:19 ` [PATCH v2 06/53] hw/core: introduce 'format_state' callback to replace 'dump_state' Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-14 15:53   ` Philippe Mathieu-Daudé
2021-09-14 15:53     ` Philippe Mathieu-Daudé
2021-09-14 19:28   ` Greg Kurz
2021-09-14 19:28     ` Greg Kurz
2021-09-14 14:19 ` [PATCH v2 07/53] target/alpha: convert to use format_state instead of dump_state Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-15  7:10   ` Philippe Mathieu-Daudé
2021-09-15  7:10     ` Philippe Mathieu-Daudé
2021-09-14 14:19 ` [PATCH v2 08/53] target/arm: " Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-14 14:19 ` [PATCH v2 09/53] target/avr: " Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-15  7:13   ` Philippe Mathieu-Daudé
2021-09-15  7:13     ` Philippe Mathieu-Daudé
2021-09-15  8:49     ` Daniel P. Berrangé
2021-09-15  8:49       ` Daniel P. Berrangé
2021-09-15  8:58       ` Philippe Mathieu-Daudé
2021-09-15  8:58         ` Philippe Mathieu-Daudé
2021-09-14 14:19 ` [PATCH v2 10/53] target/cris: " Daniel P. Berrangé
2021-09-14 14:19   ` Daniel P. Berrangé
2021-09-15  7:33   ` Philippe Mathieu-Daudé
2021-09-15  7:33     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 11/53] target/hexagon: delete unused hexagon_debug() method Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:50   ` Taylor Simpson
2021-09-14 14:50     ` Taylor Simpson
2021-09-15  7:00   ` Philippe Mathieu-Daudé
2021-09-15  7:00     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 12/53] target/hexagon: convert to use format_state instead of dump_state Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:14   ` Philippe Mathieu-Daudé
2021-09-15  7:14     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 13/53] target/hppa: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:15   ` Philippe Mathieu-Daudé
2021-09-15  7:15     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 14/53] target/i386: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 15/53] target/m68k: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 19:58   ` Laurent Vivier
2021-09-14 19:58     ` Laurent Vivier
2021-09-15  7:17   ` Philippe Mathieu-Daudé
2021-09-15  7:17     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 16/53] target/microblaze: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:18   ` Philippe Mathieu-Daudé
2021-09-15  7:18     ` Philippe Mathieu-Daudé
2021-09-15  7:21     ` Philippe Mathieu-Daudé
2021-09-15  7:21       ` Philippe Mathieu-Daudé
2021-09-15  7:23       ` Philippe Mathieu-Daudé
2021-09-15  7:23         ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 17/53] target/mips: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:04   ` Philippe Mathieu-Daudé
2021-09-15  7:04     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 18/53] target/nios2: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:08   ` Philippe Mathieu-Daudé
2021-09-15  7:08     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 19/53] target/openrisc: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:19   ` Philippe Mathieu-Daudé
2021-09-15  7:19     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 20/53] target/ppc: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 19:30   ` Greg Kurz
2021-09-14 19:30     ` Greg Kurz
2021-09-15  1:37   ` David Gibson
2021-09-15  1:37     ` David Gibson
2021-09-14 14:20 ` [PATCH v2 21/53] target/riscv: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 22/53] target/rx: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:20   ` Philippe Mathieu-Daudé
2021-09-15  7:20     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 23/53] target/s390x: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 24/53] target/sh: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:24   ` Philippe Mathieu-Daudé
2021-09-15  7:24     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 25/53] target/sparc: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:27   ` Philippe Mathieu-Daudé
2021-09-15  7:27     ` Philippe Mathieu-Daudé
2021-09-16 10:53   ` Mark Cave-Ayland
2021-09-16 10:53     ` Mark Cave-Ayland
2021-09-14 14:20 ` [PATCH v2 26/53] target/tricore: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:29   ` Philippe Mathieu-Daudé
2021-09-15  7:29     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 27/53] target/xtensa: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  7:32   ` Philippe Mathieu-Daudé
2021-09-15  7:32     ` Philippe Mathieu-Daudé
2021-09-15  7:54     ` Max Filippov
2021-09-15  7:54       ` Max Filippov
2021-09-15  8:52     ` Daniel P. Berrangé
2021-09-15  8:52       ` Daniel P. Berrangé
2021-09-15  9:01       ` Philippe Mathieu-Daudé
2021-09-15  9:01         ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 28/53] monitor: remove 'info ioapic' HMP command Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 15:50   ` Philippe Mathieu-Daudé
2021-09-14 15:50     ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 29/53] qapi: introduce x-query-registers QMP command Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 16:04   ` Eric Blake
2021-09-14 16:04     ` Eric Blake
2021-09-14 17:15     ` Philippe Mathieu-Daudé
2021-09-14 17:15       ` Philippe Mathieu-Daudé
2021-09-14 17:18       ` Philippe Mathieu-Daudé
2021-09-14 17:18         ` Philippe Mathieu-Daudé
2021-09-14 14:20 ` [PATCH v2 30/53] qapi: introduce x-query-roms " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 16:04   ` Philippe Mathieu-Daudé
2021-09-14 16:04     ` Philippe Mathieu-Daudé
2021-09-14 16:42     ` Daniel P. Berrangé
2021-09-14 16:42       ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 31/53] qapi: introduce x-query-profile " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 32/53] qapi: introduce x-query-numa " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 33/53] qapi: introduce x-query-usb " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 34/53] qapi: introduce x-query-rdma " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 35/53] qapi: introduce x-query-ramblock " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 36/53] qapi: introduce x-query-skeys " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 37/53] qapi: introduce x-query-cmma " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` Daniel P. Berrangé [this message]
2021-09-14 14:20   ` [PATCH v2 38/53] qapi: introduce x-query-lapic " Daniel P. Berrangé
2021-09-21  5:27   ` Dongli Zhang
2021-09-21  5:27     ` Dongli Zhang
2021-09-22 16:30     ` Daniel P. Berrangé
2021-09-22 16:30       ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 39/53] qapi: introduce x-query-irq " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 40/53] hw/core: drop "dump_state" callback from CPU targets Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 41/53] hw/core: drop support for NULL pointer for FILE * in cpu_dump_state Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 42/53] hw/core: introduce a 'format_tlb' callback Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 15:56   ` Philippe Mathieu-Daudé
2021-09-14 15:56     ` Philippe Mathieu-Daudé
2021-09-14 16:34     ` Daniel P. Berrangé
2021-09-14 16:34       ` Daniel P. Berrangé
2021-09-14 17:02       ` Philippe Mathieu-Daudé
2021-09-14 17:02         ` Philippe Mathieu-Daudé
2021-09-14 17:12         ` Daniel P. Berrangé
2021-09-14 17:12           ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 43/53] target/i386: convert to use format_tlb callback Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 44/53] target/m68k: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 19:59   ` Laurent Vivier
2021-09-14 19:59     ` Laurent Vivier
2021-09-14 14:20 ` [PATCH v2 45/53] target/nios2: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 46/53] target/ppc: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  1:40   ` David Gibson
2021-09-15  1:40     ` David Gibson
2021-09-14 14:20 ` [PATCH v2 47/53] target/sh4: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 48/53] target/sparc: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-16 10:54   ` Mark Cave-Ayland
2021-09-16 10:54     ` Mark Cave-Ayland
2021-09-14 14:20 ` [PATCH v2 49/53] target/xtensa: " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  8:01   ` Max Filippov
2021-09-15  8:01     ` Max Filippov
2021-09-14 14:20 ` [PATCH v2 50/53] monitor: merge duplicate "info tlb" handlers Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-15  1:41   ` David Gibson
2021-09-15  1:41     ` David Gibson
2021-09-14 14:20 ` [PATCH v2 51/53] qapi: introduce x-query-tlb QMP command Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 52/53] qapi: introduce x-query-jit " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé
2021-09-14 14:20 ` [PATCH v2 53/53] qapi: introduce x-query-opcount " Daniel P. Berrangé
2021-09-14 14:20   ` Daniel P. Berrangé

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=20210914142042.1655100-39-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=aleksandar.rikalo@syrmia.com \
    --cc=alistair.francis@wdc.com \
    --cc=armbru@redhat.com \
    --cc=atar4qemu@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=bin.meng@windriver.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=crwulff@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=groug@kaod.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=kraxel@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=lvivier@redhat.com \
    --cc=marex@denx.de \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mrolnik@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shorne@gmail.com \
    --cc=thuth@redhat.com \
    --cc=tsimpson@quicinc.com \
    --cc=ysato@users.sourceforge.jp \
    --cc=yuval.shaia.ml@gmail.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.