qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/3] hmp queue
@ 2020-11-13 13:05 Dr. David Alan Gilbert (git)
  2020-11-13 18:45 ` Peter Maydell
  0 siblings, 1 reply; 9+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2020-11-13 13:05 UTC (permalink / raw)
  To: qemu-devel, kwolf, lichun

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

The following changes since commit be2df2ac6f6b9eeee21cc057de0a119ac30fbc60:

  Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20201112' into staging (2020-11-13 11:36:30 +0000)

are available in the Git repository at:

  git://github.com/dagrh/qemu.git tags/pull-hmp-20201113

for you to fetch changes up to e7cff9c68d4a46343861fbc3cc6b2a0b63b2dbb8:

  hmp: Pass monitor to mon_get_cpu_env() (2020-11-13 12:45:51 +0000)

----------------------------------------------------------------
HMP fixes

Kevin's HMP fixes

----------------------------------------------------------------
Kevin Wolf (3):
      hmp: Pass monitor to mon_get_cpu()
      hmp: Pass monitor to MonitorDef.get_value()
      hmp: Pass monitor to mon_get_cpu_env()

 include/monitor/hmp-target.h |  7 ++++---
 monitor/hmp.c                |  2 +-
 monitor/misc.c               | 24 ++++++++++++------------
 monitor/monitor-internal.h   |  2 +-
 target/i386/monitor.c        | 11 ++++++-----
 target/m68k/monitor.c        |  2 +-
 target/nios2/monitor.c       |  2 +-
 target/ppc/monitor.c         | 22 +++++++++++++---------
 target/riscv/monitor.c       |  2 +-
 target/sh4/monitor.c         |  2 +-
 target/sparc/monitor.c       | 12 +++++++-----
 target/xtensa/monitor.c      |  2 +-
 12 files changed, 49 insertions(+), 41 deletions(-)



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

* Re: [PULL 0/3] hmp queue
  2020-11-13 13:05 Dr. David Alan Gilbert (git)
@ 2020-11-13 18:45 ` Peter Maydell
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2020-11-13 18:45 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git); +Cc: Kevin Wolf, lichun, QEMU Developers

On Fri, 13 Nov 2020 at 13:11, Dr. David Alan Gilbert (git)
<dgilbert@redhat.com> wrote:
>
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> The following changes since commit be2df2ac6f6b9eeee21cc057de0a119ac30fbc60:
>
>   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20201112' into staging (2020-11-13 11:36:30 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/dagrh/qemu.git tags/pull-hmp-20201113
>
> for you to fetch changes up to e7cff9c68d4a46343861fbc3cc6b2a0b63b2dbb8:
>
>   hmp: Pass monitor to mon_get_cpu_env() (2020-11-13 12:45:51 +0000)
>
> ----------------------------------------------------------------
> HMP fixes
>
> Kevin's HMP fixes


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.

-- PMM


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

* [PULL 0/3] hmp queue
@ 2022-09-15 15:46 Dr. David Alan Gilbert (git)
  2022-09-15 15:46 ` [PULL 1/3] monitor: Support specified vCPU registers Dr. David Alan Gilbert (git)
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2022-09-15 15:46 UTC (permalink / raw)
  To: qemu-devel, pizhenwei, dongli.zhang; +Cc: armbru

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

The following changes since commit 79dfa177ae348bb5ab5f97c0915359b13d6186e2:

  Merge tag 'pull-qapi-2022-09-07' of git://repo.or.cz/qemu/armbru into staging (2022-09-07 13:13:30 -0400)

are available in the Git repository at:

  https://gitlab.com/dagrh/qemu.git tags/pull-hmp-20220915a

for you to fetch changes up to 22269b0436cc8e4aaac975b4c8cb01b343d09661:

  hmp: Fix ordering of text (2022-09-15 14:13:30 +0100)

----------------------------------------------------------------
HMP pull 2022-09-15

A set of 3 small additions/fixes.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

----------------------------------------------------------------
Dongli Zhang (1):
      monitor/hmp: print trace as option in help for log command

Dr. David Alan Gilbert (1):
      hmp: Fix ordering of text

Zhenwei Pi (1):
      monitor: Support specified vCPU registers

 hmp-commands-info.hx |  8 +++++---
 hmp-commands.hx      | 46 +++++++++++++++++++++++-----------------------
 monitor/hmp.c        |  9 +++++++--
 monitor/misc.c       | 10 ++++++++--
 4 files changed, 43 insertions(+), 30 deletions(-)



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

* [PULL 1/3] monitor: Support specified vCPU registers
  2022-09-15 15:46 [PULL 0/3] hmp queue Dr. David Alan Gilbert (git)
@ 2022-09-15 15:46 ` Dr. David Alan Gilbert (git)
  2022-09-15 15:46 ` [PULL 2/3] monitor/hmp: print trace as option in help for log command Dr. David Alan Gilbert (git)
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2022-09-15 15:46 UTC (permalink / raw)
  To: qemu-devel, pizhenwei, dongli.zhang; +Cc: armbru

From: zhenwei pi <pizhenwei@bytedance.com>

Originally we have to get all the vCPU registers and parse the
specified one. To improve the performance of this usage, allow user
specified vCPU id to query registers.

Run a VM with 16 vCPU, use bcc tool to track the latency of
'hmp_info_registers':
'info registers -a' uses about 3ms;
'info registers 12' uses about 150us.

Cc: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20220802073720.1236988-2-pizhenwei@bytedance.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hmp-commands-info.hx |  8 +++++---
 monitor/misc.c       | 10 ++++++++--
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
index 188d9ece3b..e012035541 100644
--- a/hmp-commands-info.hx
+++ b/hmp-commands-info.hx
@@ -100,9 +100,11 @@ ERST
 
     {
         .name       = "registers",
-        .args_type  = "cpustate_all:-a",
-        .params     = "[-a]",
-        .help       = "show the cpu registers (-a: all - show register info for all cpus)",
+        .args_type  = "cpustate_all:-a,vcpu:i?",
+        .params     = "[-a|vcpu]",
+        .help       = "show the cpu registers (-a: show register info for all cpus;"
+                      " vcpu: specific vCPU to query; show the current CPU's registers if"
+                      " no argument is specified)",
         .cmd        = hmp_info_registers,
     },
 
diff --git a/monitor/misc.c b/monitor/misc.c
index 3d2312ba8d..6436a8786b 100644
--- a/monitor/misc.c
+++ b/monitor/misc.c
@@ -307,6 +307,7 @@ int monitor_get_cpu_index(Monitor *mon)
 static void hmp_info_registers(Monitor *mon, const QDict *qdict)
 {
     bool all_cpus = qdict_get_try_bool(qdict, "cpustate_all", false);
+    int vcpu = qdict_get_try_int(qdict, "vcpu", -1);
     CPUState *cs;
 
     if (all_cpus) {
@@ -315,13 +316,18 @@ static void hmp_info_registers(Monitor *mon, const QDict *qdict)
             cpu_dump_state(cs, NULL, CPU_DUMP_FPU);
         }
     } else {
-        cs = mon_get_cpu(mon);
+        cs = vcpu >= 0 ? qemu_get_cpu(vcpu) : mon_get_cpu(mon);
 
         if (!cs) {
-            monitor_printf(mon, "No CPU available\n");
+            if (vcpu >= 0) {
+                monitor_printf(mon, "CPU#%d not available\n", vcpu);
+            } else {
+                monitor_printf(mon, "No CPU available\n");
+            }
             return;
         }
 
+        monitor_printf(mon, "\nCPU#%d\n", cs->cpu_index);
         cpu_dump_state(cs, NULL, CPU_DUMP_FPU);
     }
 }
-- 
2.37.3



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

* [PULL 2/3] monitor/hmp: print trace as option in help for log command
  2022-09-15 15:46 [PULL 0/3] hmp queue Dr. David Alan Gilbert (git)
  2022-09-15 15:46 ` [PULL 1/3] monitor: Support specified vCPU registers Dr. David Alan Gilbert (git)
@ 2022-09-15 15:46 ` Dr. David Alan Gilbert (git)
  2022-09-15 15:46 ` [PULL 3/3] hmp: Fix ordering of text Dr. David Alan Gilbert (git)
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2022-09-15 15:46 UTC (permalink / raw)
  To: qemu-devel, pizhenwei, dongli.zhang; +Cc: armbru

From: Dongli Zhang <dongli.zhang@oracle.com>

The below is printed when printing help information in qemu-system-x86_64
command line, and when CONFIG_TRACE_LOG is enabled:

----------------------------
$ qemu-system-x86_64 -d help
... ...
trace:PATTERN   enable trace events

Use "-d trace:help" to get a list of trace events.
----------------------------

However, the options of "trace:PATTERN" are only printed by
"qemu-system-x86_64 -d help", but missing in hmp "help log" command.

Fixes: c84ea00dc2 ("log: add "-d trace:PATTERN"")
Cc: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Message-Id: <20220831213943.8155-1-dongli.zhang@oracle.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 monitor/hmp.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/monitor/hmp.c b/monitor/hmp.c
index 15ca04735c..a3375d0341 100644
--- a/monitor/hmp.c
+++ b/monitor/hmp.c
@@ -285,10 +285,15 @@ void help_cmd(Monitor *mon, const char *name)
         if (!strcmp(name, "log")) {
             const QEMULogItem *item;
             monitor_printf(mon, "Log items (comma separated):\n");
-            monitor_printf(mon, "%-10s %s\n", "none", "remove all logs");
+            monitor_printf(mon, "%-15s %s\n", "none", "remove all logs");
             for (item = qemu_log_items; item->mask != 0; item++) {
-                monitor_printf(mon, "%-10s %s\n", item->name, item->help);
+                monitor_printf(mon, "%-15s %s\n", item->name, item->help);
             }
+#ifdef CONFIG_TRACE_LOG
+            monitor_printf(mon, "trace:PATTERN   enable trace events\n");
+            monitor_printf(mon, "\nUse \"log trace:help\" to get a list of "
+                           "trace events.\n\n");
+#endif
             return;
         }
 
-- 
2.37.3



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

* [PULL 3/3] hmp: Fix ordering of text
  2022-09-15 15:46 [PULL 0/3] hmp queue Dr. David Alan Gilbert (git)
  2022-09-15 15:46 ` [PULL 1/3] monitor: Support specified vCPU registers Dr. David Alan Gilbert (git)
  2022-09-15 15:46 ` [PULL 2/3] monitor/hmp: print trace as option in help for log command Dr. David Alan Gilbert (git)
@ 2022-09-15 15:46 ` Dr. David Alan Gilbert (git)
  2022-09-17 20:14 ` [PULL 0/3] hmp queue Stefan Hajnoczi
  2022-09-20 15:30 ` Thomas Huth
  4 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2022-09-15 15:46 UTC (permalink / raw)
  To: qemu-devel, pizhenwei, dongli.zhang; +Cc: armbru

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Fix the ordering of the help text so it's always after the commands
being defined.  A few had got out of order.  Keep 'info' at the end.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hmp-commands.hx | 46 +++++++++++++++++++++++-----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/hmp-commands.hx b/hmp-commands.hx
index 182e639d14..8ab8000acd 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1742,23 +1742,6 @@ SRST
   *icount* for the reference may be observed with ``info replay`` command.
 ERST
 
-    {
-        .name       = "info",
-        .args_type  = "item:s?",
-        .params     = "[subcommand]",
-        .help       = "show various information about the system state",
-        .cmd        = hmp_info_help,
-        .sub_table  = hmp_info_cmds,
-        .flags      = "p",
-    },
-
-SRST
-``calc_dirty_rate`` *second*
-  Start a round of dirty rate measurement with the period specified in *second*.
-  The result of the dirty rate measurement may be observed with ``info
-  dirty_rate`` command.
-ERST
-
     {
         .name       = "calc_dirty_rate",
         .args_type  = "dirty_ring:-r,dirty_bitmap:-b,second:l,sample_pages_per_GB:l?",
@@ -1770,10 +1753,10 @@ ERST
     },
 
 SRST
-``set_vcpu_dirty_limit``
-  Set dirty page rate limit on virtual CPU, the information about all the
-  virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit``
-  command.
+``calc_dirty_rate`` *second*
+  Start a round of dirty rate measurement with the period specified in *second*.
+  The result of the dirty rate measurement may be observed with ``info
+  dirty_rate`` command.
 ERST
 
     {
@@ -1786,8 +1769,8 @@ ERST
     },
 
 SRST
-``cancel_vcpu_dirty_limit``
-  Cancel dirty page rate limit on virtual CPU, the information about all the
+``set_vcpu_dirty_limit``
+  Set dirty page rate limit on virtual CPU, the information about all the
   virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit``
   command.
 ERST
@@ -1800,3 +1783,20 @@ ERST
                       "\n\t\t\t\t\t limit on a specified virtual cpu",
         .cmd        = hmp_cancel_vcpu_dirty_limit,
     },
+
+SRST
+``cancel_vcpu_dirty_limit``
+  Cancel dirty page rate limit on virtual CPU, the information about all the
+  virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit``
+  command.
+ERST
+
+    {
+        .name       = "info",
+        .args_type  = "item:s?",
+        .params     = "[subcommand]",
+        .help       = "show various information about the system state",
+        .cmd        = hmp_info_help,
+        .sub_table  = hmp_info_cmds,
+        .flags      = "p",
+    },
-- 
2.37.3



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

* Re: [PULL 0/3] hmp queue
  2022-09-15 15:46 [PULL 0/3] hmp queue Dr. David Alan Gilbert (git)
                   ` (2 preceding siblings ...)
  2022-09-15 15:46 ` [PULL 3/3] hmp: Fix ordering of text Dr. David Alan Gilbert (git)
@ 2022-09-17 20:14 ` Stefan Hajnoczi
  2022-09-20 15:30 ` Thomas Huth
  4 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2022-09-17 20:14 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git); +Cc: qemu-devel, pizhenwei, dongli.zhang, armbru

[-- Attachment #1: Type: text/plain, Size: 115 bytes --]

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PULL 0/3] hmp queue
  2022-09-15 15:46 [PULL 0/3] hmp queue Dr. David Alan Gilbert (git)
                   ` (3 preceding siblings ...)
  2022-09-17 20:14 ` [PULL 0/3] hmp queue Stefan Hajnoczi
@ 2022-09-20 15:30 ` Thomas Huth
  2022-09-20 16:39   ` Thomas Huth
  4 siblings, 1 reply; 9+ messages in thread
From: Thomas Huth @ 2022-09-20 15:30 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git), qemu-devel, pizhenwei, dongli.zhang; +Cc: armbru

On 15/09/2022 17.46, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> The following changes since commit 79dfa177ae348bb5ab5f97c0915359b13d6186e2:
> 
>    Merge tag 'pull-qapi-2022-09-07' of git://repo.or.cz/qemu/armbru into staging (2022-09-07 13:13:30 -0400)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/dagrh/qemu.git tags/pull-hmp-20220915a
> 
> for you to fetch changes up to 22269b0436cc8e4aaac975b4c8cb01b343d09661:
> 
>    hmp: Fix ordering of text (2022-09-15 14:13:30 +0100)

Not sure whether it's caused by this merge, but a lot of the avocado jobs 
are failing now in the CI:

  https://gitlab.com/qemu-project/qemu/-/pipelines/643064395

I've seen some few Avocado failures (e.g. with the Debian job) in the past 
already, but the amount of simultaneous failures seem to have increased now. 
Does anybody have a clue what have caused this?

  Thomas



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

* Re: [PULL 0/3] hmp queue
  2022-09-20 15:30 ` Thomas Huth
@ 2022-09-20 16:39   ` Thomas Huth
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Huth @ 2022-09-20 16:39 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git), qemu-devel, pizhenwei, dongli.zhang; +Cc: armbru

On 20/09/2022 17.30, Thomas Huth wrote:
> On 15/09/2022 17.46, Dr. David Alan Gilbert (git) wrote:
>> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>>
>> The following changes since commit 79dfa177ae348bb5ab5f97c0915359b13d6186e2:
>>
>>    Merge tag 'pull-qapi-2022-09-07' of git://repo.or.cz/qemu/armbru into 
>> staging (2022-09-07 13:13:30 -0400)
>>
>> are available in the Git repository at:
>>
>>    https://gitlab.com/dagrh/qemu.git tags/pull-hmp-20220915a
>>
>> for you to fetch changes up to 22269b0436cc8e4aaac975b4c8cb01b343d09661:
>>
>>    hmp: Fix ordering of text (2022-09-15 14:13:30 +0100)
> 
> Not sure whether it's caused by this merge, but a lot of the avocado jobs 
> are failing now in the CI:
> 
>   https://gitlab.com/qemu-project/qemu/-/pipelines/643064395
> 
> I've seen some few Avocado failures (e.g. with the Debian job) in the past 
> already, but the amount of simultaneous failures seem to have increased now. 
> Does anybody have a clue what have caused this?

I was able to reproduce the issue locally on my laptop, so I bisected it ... 
it's not related to the HMP pull request, but to Peter's ARM pull request a 
little bit earlier. I'll follow up there.

  Thomas




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

end of thread, other threads:[~2022-09-20 21:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-15 15:46 [PULL 0/3] hmp queue Dr. David Alan Gilbert (git)
2022-09-15 15:46 ` [PULL 1/3] monitor: Support specified vCPU registers Dr. David Alan Gilbert (git)
2022-09-15 15:46 ` [PULL 2/3] monitor/hmp: print trace as option in help for log command Dr. David Alan Gilbert (git)
2022-09-15 15:46 ` [PULL 3/3] hmp: Fix ordering of text Dr. David Alan Gilbert (git)
2022-09-17 20:14 ` [PULL 0/3] hmp queue Stefan Hajnoczi
2022-09-20 15:30 ` Thomas Huth
2022-09-20 16:39   ` Thomas Huth
  -- strict thread matches above, loose matches on Subject: below --
2020-11-13 13:05 Dr. David Alan Gilbert (git)
2020-11-13 18:45 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).