All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dave@treblig.org>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Chinmay Rath" <rathc@linux.ibm.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Glenn Miles" <milesg@linux.ibm.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Daniel Henrique Barboza" <daniel.barboza@oss.qualcomm.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Chao Liu" <chao.liu@processmission.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Helge Deller" <deller@gmx.de>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
	"Warner Losh" <imp@bsdimp.com>, "Kyle Evans" <kevans@freebsd.org>
Subject: Re: [PATCH v3 00/18] monitor/hmp: replace MonitorDef with GDB registers
Date: Sun, 25 Oct 2026 16:06:00 +0000	[thread overview]
Message-ID: <at4o6M_FWpVwtL0I@gallifrey> (raw)
In-Reply-To: <CAJ+F1CJWJc=5okkvBYuKhFjU4=iZGWECYmTMMFDbeawA-GGN7A@mail.gmail.com>

* Marc-André Lureau (marcandre.lureau@redhat.com) wrote:
> Hi
> 
> On Sat, Oct 24, 2026 at 7:52 PM Dr. David Alan Gilbert <dave@treblig.org> wrote:
> >
> > * Marc-André Lureau (marcandre.lureau@redhat.com) wrote:
> > > Hi,
> > >
> > > HMP monitor supports printing $register expression. The lookup
> > > was done via GDB stub registers, and supplementary MonitorDef
> > > HMP-specific tables.
> >
> > Why don't you get the first ~3 of these merged and then you can take the
> > others through the individual targets at their own pace.
> 
> Because I am not a GDB stub or HMP maintainer. Should I send a PR
> regardless for those? they can be reviewed & applied at a maintainer
> pace.

The first one looks trivial to me.

> If you think it's too slow, I can agree :)

It's not the 'slow', it just would avoid needing to keep big patchsets
running around and everyone having to check them again each time.

Dave

> >
> > Dave
> >
> > > Migrate HMP registers to use the GDB infrastructure and remove the
> > > legacy HMP MonitorDef. Internal registers aren't exposed to GDB.
> > > This also drops HMP $pc x86 fallback (use $eip/$rip instead).
> > >
> > > Known behavioural changes on RISC-V: CSR lookup is now case-sensitive
> > > and vector registers now report "unkown register" instead of a
> > > target-specific message ("Unable to print the value of vector vreg 'v0'
> > > from this API")
> > >
> > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > > ---
> > > Changes in v3:
> > > - added x86 GDB register patches
> > >   - fix the x87 FPU tag word returned by the GDB stub
> > >   - split SSE registers into a separate org.gnu.gdb.i386.sse feature
> > >   - expose AVX/AVX-512 registers (ymm/zmm upper halves and opmask)
> > >   - expose more system registers to HMP
> > > - renamed i386-segments.xml to i386-system.xml and registered it as an
> > >   internal feature, like the other targets
> > > - moved the HMP $pc removal to its own patch and documented it in
> > >   removed-features.rst
> > > - moved each target's MonitorDef removal into its target patch; the final
> > >   patch now only removes the generic MonitorDef infrastructure
> > > - added MAINTAINERS entries
> > > - rebased onto current master
> > > - Link to v2: https://lore.kernel.org/qemu-devel/20261013-query-reg-v2-0-6f95a2e139a9@redhat.com
> > >
> > > Changes in v2:
> > > - dropped v1 patch 5 (CPUClass::get_pc fallback for $pc)
> > > - new patch gdb_register_internal_coprocessor() to hide registers from GDB
> > > - SPARC64, m68k, RISC-V aliases now use internal registration
> > > - pickup trailer tags
> > > - Link to v1: https://lore.kernel.org/qemu-devel/20260911-query-reg-v1-0-0c04f0c02cf3@redhat.com
> > >
> > > ---
> > > Marc-André Lureau (18):
> > >       hmp: don't crash on invalid register
> > >       gdbstub: fix next register base after register gaps
> > >       gdbstub: set feature->base_reg for dynamic features
> > >       gdbstub: add gdb_register_internal_coprocessor()
> > >       MAINTAINERS: cover x86 GDB XML files
> > >       target/i386: expose segment limits register to monitors via gdbstub
> > >       target/i386: fix FPU tag word in GDB register read
> > >       target/i386: split SSE registers into separate GDB feature
> > >       target/i386: expose system registers to monitors via gdbstub
> > >       target/i386: expose AVX/AVX-512 registers to GDB
> > >       target/i386: drop HMP $pc
> > >       MAINTAINERS: cover m68k GDB XML files
> > >       target/m68k: expose system registers to monitors via gdbstub
> > >       target/sparc64: expose system registers to monitors via gdbstub
> > >       target/riscv: bypass smstateen check in debugger mode
> > >       MAINTAINERS: cover riscv GDB XML files
> > >       target/riscv: expose register aliases to monitors via gdbstub
> > >       monitor/hmp: remove legacy MonitorDef infrastructure
> > >
> > >  MAINTAINERS                               |   4 +
> > >  configs/targets/i386-bsd-user.mak         |   2 +-
> > >  configs/targets/i386-linux-user.mak       |   2 +-
> > >  configs/targets/i386-softmmu.mak          |   2 +-
> > >  configs/targets/m68k-softmmu.mak          |   2 +-
> > >  configs/targets/riscv32-linux-user.mak    |   2 +-
> > >  configs/targets/riscv32-softmmu.mak       |   2 +-
> > >  configs/targets/riscv64-bsd-user.mak      |   2 +-
> > >  configs/targets/riscv64-linux-user.mak    |   2 +-
> > >  configs/targets/riscv64-softmmu.mak       |   2 +-
> > >  configs/targets/sparc64-softmmu.mak       |   2 +-
> > >  configs/targets/x86_64-bsd-user.mak       |   2 +-
> > >  configs/targets/x86_64-linux-user.mak     |   2 +-
> > >  configs/targets/x86_64-softmmu.mak        |   2 +-
> > >  docs/about/removed-features.rst           |   8 +
> > >  gdbstub/gdb-xml/i386-32bit-avx.xml        |  20 ++
> > >  gdbstub/gdb-xml/i386-32bit-avx512.xml     |  31 +++
> > >  gdbstub/gdb-xml/i386-32bit-sse.xml        |  54 +++++
> > >  gdbstub/gdb-xml/i386-32bit.xml            |  46 +---
> > >  gdbstub/gdb-xml/i386-64bit-avx.xml        |  28 +++
> > >  gdbstub/gdb-xml/i386-64bit-avx512.xml     | 108 +++++++++
> > >  gdbstub/gdb-xml/i386-64bit-sse.xml        |  62 +++++
> > >  gdbstub/gdb-xml/i386-64bit.xml            |  50 ----
> > >  gdbstub/gdb-xml/i386-system.xml           |  53 +++++
> > >  gdbstub/gdb-xml/m68k-system.xml           |  32 +++
> > >  gdbstub/gdb-xml/riscv-32bit-alias.xml     | 105 +++++++++
> > >  gdbstub/gdb-xml/riscv-32bit-fpu-alias.xml |  40 ++++
> > >  gdbstub/gdb-xml/riscv-64bit-alias.xml     | 105 +++++++++
> > >  gdbstub/gdb-xml/riscv-64bit-fpu-alias.xml |  46 ++++
> > >  gdbstub/gdb-xml/sparc64-system.xml        |  22 ++
> > >  gdbstub/gdbstub.c                         |  85 +++++--
> > >  include/exec/gdbstub.h                    |  21 ++
> > >  include/hw/core/cpu.h                     |   5 +-
> > >  include/hw/core/sysemu-cpu-ops.h          |  16 --
> > >  include/monitor/hmp.h                     |   6 -
> > >  include/qemu/typedefs.h                   |   1 -
> > >  monitor/hmp.c                             |  45 +---
> > >  target/arm/gdbstub.c                      |   8 +-
> > >  target/arm/gdbstub64.c                    |  10 +-
> > >  target/i386/cpu-dump.c                    |   5 +-
> > >  target/i386/cpu.c                         |  60 +++--
> > >  target/i386/cpu.h                         |  25 ++
> > >  target/i386/gdbstub.c                     | 373 +++++++++++++++++++++++++++---
> > >  target/i386/tcg/fpu_helper.c              |  24 +-
> > >  target/m68k/cpu.c                         |  22 --
> > >  target/m68k/helper.c                      |  49 +++-
> > >  target/ppc/gdbstub.c                      |   2 +-
> > >  target/riscv/cpu.c                        |   1 -
> > >  target/riscv/gdbstub.c                    |  57 ++++-
> > >  target/riscv/internals.h                  |   3 -
> > >  target/riscv/monitor.c                    | 140 -----------
> > >  target/riscv/tcg/csr.c                    |   3 +-
> > >  target/sparc/cpu.c                        |  19 --
> > >  target/sparc/gdbstub.c                    |  38 +++
> > >  target/xtensa/cpu.c                       |   2 +-
> > >  tests/qtest/test-hmp.c                    |   1 -
> > >  56 files changed, 1383 insertions(+), 478 deletions(-)
> > > ---
> > > base-commit: 8967b2fe1b2aaae3c29e207d85fab901d580a2dc
> > > change-id: 20260910-query-reg-80cd59cf4707
> > >
> > > Best regards,
> > > --
> > > Marc-André Lureau <marcandre.lureau@redhat.com>
> > >
> > --
> >  -----Open up your eyes, open up your mind, open up your code -------
> > / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \
> > \        dave @ treblig.org |                               | In Hex /
> >  \ _________________________|_____ http://www.treblig.org   |_______/
> >
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


      reply	other threads:[~2026-10-25 16:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 10:56 [PATCH v3 00/18] monitor/hmp: replace MonitorDef with GDB registers Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 01/18] hmp: don't crash on invalid register Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 02/18] gdbstub: fix next register base after register gaps Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 03/18] gdbstub: set feature->base_reg for dynamic features Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 04/18] gdbstub: add gdb_register_internal_coprocessor() Marc-André Lureau
2026-10-22 21:51   ` Pierrick Bouvier
2026-10-22 10:56 ` [PATCH v3 05/18] MAINTAINERS: cover x86 GDB XML files Marc-André Lureau
2026-10-22 20:44   ` Pierrick Bouvier
2026-10-22 10:56 ` [PATCH v3 06/18] target/i386: expose segment limits register to monitors via gdbstub Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 07/18] target/i386: fix FPU tag word in GDB register read Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 08/18] target/i386: split SSE registers into separate GDB feature Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 09/18] target/i386: expose system registers to monitors via gdbstub Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 10/18] target/i386: expose AVX/AVX-512 registers to GDB Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 11/18] target/i386: drop HMP $pc Marc-André Lureau
2026-10-22 23:34   ` Dr. David Alan Gilbert
2026-10-23 20:45     ` Marc-André Lureau
2026-10-23 22:51       ` Dr. David Alan Gilbert
2026-10-22 10:56 ` [PATCH v3 12/18] MAINTAINERS: cover m68k GDB XML files Marc-André Lureau
2026-10-22 21:51   ` Pierrick Bouvier
2026-10-22 10:56 ` [PATCH v3 13/18] target/m68k: expose system registers to monitors via gdbstub Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 14/18] target/sparc64: " Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 15/18] target/riscv: bypass smstateen check in debugger mode Marc-André Lureau
2026-10-22 10:56 ` [PATCH v3 16/18] MAINTAINERS: cover riscv GDB XML files Marc-André Lureau
2026-10-22 21:51   ` Pierrick Bouvier
2026-10-22 10:56 ` [PATCH v3 17/18] target/riscv: expose register aliases to monitors via gdbstub Marc-André Lureau
2026-10-23 19:50   ` Daniel Henrique Barboza
2026-10-22 10:56 ` [PATCH v3 18/18] monitor/hmp: remove legacy MonitorDef infrastructure Marc-André Lureau
2026-10-22 21:52   ` Pierrick Bouvier
2026-10-24 15:51 ` [PATCH v3 00/18] monitor/hmp: replace MonitorDef with GDB registers Dr. David Alan Gilbert
2026-10-25  8:26   ` Marc-André Lureau
2026-10-25 16:06     ` Dr. David Alan Gilbert [this message]

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=at4o6M_FWpVwtL0I@gallifrey \
    --to=dave@treblig.org \
    --cc=alex.bennee@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=atar4qemu@gmail.com \
    --cc=chao.liu@processmission.com \
    --cc=daniel.barboza@oss.qualcomm.com \
    --cc=deller@gmx.de \
    --cc=harshpb@linux.ibm.com \
    --cc=imp@bsdimp.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=kevans@freebsd.org \
    --cc=laurent@vivier.eu \
    --cc=liwei1518@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=milesg@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@oss.qualcomm.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=rathc@linux.ibm.com \
    --cc=zhao1.liu@intel.com \
    --cc=zhiwei_liu@linux.alibaba.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.