All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH  00/11] gdbstub re-factor and SVE support
@ 2019-11-15 17:29 Alex Bennée
  2019-11-15 17:29 ` [RFC PATCH 01/11] gdbstub: move allocation of GDBState to one place Alex Bennée
                   ` (10 more replies)
  0 siblings, 11 replies; 32+ messages in thread
From: Alex Bennée @ 2019-11-15 17:29 UTC (permalink / raw)
  To: qemu-devel
  Cc: damien.hedde, luis.machado, Alex Bennée, richard.henderson,
	alan.hayward

Hi,

This RFC is for supporting SVE registers in QEMU's gdbstub.

However on the way to that there is a bunch of re-factoring to the
core gdbstub code to remove some of the hardcoded size limits from its
various buffers. By using dynamically sized buffers we are less likely
to trip up as we potentially push these large registers into the
staging memory before transmission. Ultimately we end up touching all
guest gdbstub register code to make them push bytes into a GByteArray
rather than directly poking memory. For the most part this is a
mechanical process although PPC makes it a little uglier as it can
dynamically change endianess and therefor has its own custom byte
swapping routine after the fact.

One other thing to note is that currently we don't match the existing
gdbstub XML (org.gnu.gdb.aarch64.sve) opting instead to send our own
register layout (org.qemu.gdb.aarch64.sve). The principle difference
is we report the registers in quads (e.g. z0p0 -> z0pN) depending on
the configured size of the machine. It could be changed easily enough
but I was having trouble getting gdbstub on the current master to work
so went with something I could understand more easily.

Alex Bennée (11):
  gdbstub: move allocation of GDBState to one place
  gdbstub: stop passing GDBState * around
  gdbstub: move str_buf to GDBState and use GString
  gdbstub: move mem_buf to GDBState and use GByteArray
  gdbstub: add helper for 128 bit registers
  target/arm: use gdb_get_reg helpers
  target/m68k: use gdb_get_reg helpers
  gdbstub: extend GByteArray to read register helpers
  target/arm: prepare for multiple dynamic XMLs
  target/arm: explicitly encode regnum in our XML
  target/arm: generate xml description of our SVE registers

 include/exec/gdbstub.h              |  41 ++-
 include/hw/core/cpu.h               |   2 +-
 target/alpha/cpu.h                  |   2 +-
 target/arm/cpu.h                    |  34 +-
 target/cris/cpu.h                   |   4 +-
 target/hppa/cpu.h                   |   2 +-
 target/i386/cpu.h                   |   2 +-
 target/lm32/cpu.h                   |   2 +-
 target/m68k/cpu.h                   |   2 +-
 target/microblaze/cpu.h             |   2 +-
 target/mips/internal.h              |   2 +-
 target/openrisc/cpu.h               |   2 +-
 target/ppc/cpu.h                    |   4 +-
 target/riscv/cpu.h                  |   2 +-
 target/s390x/internal.h             |   2 +-
 target/sh4/cpu.h                    |   2 +-
 target/sparc/cpu.h                  |   2 +-
 target/xtensa/cpu.h                 |   2 +-
 gdbstub.c                           | 520 +++++++++++++++-------------
 hw/core/cpu.c                       |   2 +-
 target/alpha/gdbstub.c              |   2 +-
 target/arm/gdbstub.c                | 137 +++++++-
 target/arm/gdbstub64.c              |   2 +-
 target/arm/helper.c                 | 108 ++++--
 target/cris/gdbstub.c               |   4 +-
 target/hppa/gdbstub.c               |   2 +-
 target/i386/gdbstub.c               |   2 +-
 target/lm32/gdbstub.c               |   2 +-
 target/m68k/gdbstub.c               |   2 +-
 target/m68k/helper.c                |  33 +-
 target/microblaze/gdbstub.c         |   2 +-
 target/mips/gdbstub.c               |   2 +-
 target/nios2/cpu.c                  |   2 +-
 target/openrisc/gdbstub.c           |   2 +-
 target/ppc/gdbstub.c                |  48 +--
 target/ppc/translate_init.inc.c     |  54 +--
 target/riscv/gdbstub.c              |  18 +-
 target/s390x/gdbstub.c              |  30 +-
 target/sh4/gdbstub.c                |   2 +-
 target/sparc/gdbstub.c              |   2 +-
 target/xtensa/gdbstub.c             |   2 +-
 tests/tcg/multiarch/float_helpers.c |   7 +-
 42 files changed, 659 insertions(+), 439 deletions(-)

-- 
2.20.1



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

end of thread, other threads:[~2019-11-18 12:00 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 17:29 [RFC PATCH 00/11] gdbstub re-factor and SVE support Alex Bennée
2019-11-15 17:29 ` [RFC PATCH 01/11] gdbstub: move allocation of GDBState to one place Alex Bennée
2019-11-18  7:37   ` Richard Henderson
2019-11-18  7:41   ` Richard Henderson
2019-11-18  9:19     ` Damien Hedde
2019-11-18 11:24       ` Richard Henderson
2019-11-18  9:50   ` Damien Hedde
2019-11-15 17:29 ` [RFC PATCH 02/11] gdbstub: stop passing GDBState * around Alex Bennée
2019-11-18  7:47   ` Richard Henderson
2019-11-18 11:52     ` Alex Bennée
2019-11-18 11:57       ` Richard Henderson
2019-11-18  9:40   ` Damien Hedde
2019-11-18 11:59     ` Alex Bennée
2019-11-15 17:29 ` [RFC PATCH 03/11] gdbstub: move str_buf to GDBState and use GString Alex Bennée
2019-11-18  8:06   ` Richard Henderson
2019-11-15 17:29 ` [RFC PATCH 04/11] gdbstub: move mem_buf to GDBState and use GByteArray Alex Bennée
2019-11-18  8:10   ` Richard Henderson
2019-11-15 17:29 ` [RFC PATCH 05/11] gdbstub: add helper for 128 bit registers Alex Bennée
2019-11-18  8:13   ` Richard Henderson
2019-11-15 17:29 ` [RFC PATCH 06/11] target/arm: use gdb_get_reg helpers Alex Bennée
2019-11-18  8:19   ` Richard Henderson
2019-11-15 17:29 ` [RFC PATCH 07/11] target/m68k: " Alex Bennée
2019-11-18  8:21   ` Richard Henderson
2019-11-15 17:29 ` [RFC PATCH 08/11] gdbstub: extend GByteArray to read register helpers Alex Bennée
2019-11-15 17:29   ` Alex Bennée
2019-11-18  8:41   ` Richard Henderson
2019-11-18  8:41     ` Richard Henderson
2019-11-15 17:29 ` [RFC PATCH 09/11] target/arm: prepare for multiple dynamic XMLs Alex Bennée
2019-11-15 17:29 ` [RFC PATCH 10/11] target/arm: explicitly encode regnum in our XML Alex Bennée
2019-11-18  8:43   ` Richard Henderson
2019-11-15 17:30 ` [RFC PATCH 11/11] target/arm: generate xml description of our SVE registers Alex Bennée
2019-11-18  8:46   ` Richard Henderson

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.