All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: damien.hedde@greensocs.com, luis.machado@linaro.org,
	"Alex Bennée" <alex.bennee@linaro.org>,
	richard.henderson@linaro.org, alan.hayward@arm.com
Subject: [RFC PATCH  00/11] gdbstub re-factor and SVE support
Date: Fri, 15 Nov 2019 17:29:49 +0000	[thread overview]
Message-ID: <20191115173000.21891-1-alex.bennee@linaro.org> (raw)

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



             reply	other threads:[~2019-11-15 17:34 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 17:29 Alex Bennée [this message]
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

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=20191115173000.21891-1-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=alan.hayward@arm.com \
    --cc=damien.hedde@greensocs.com \
    --cc=luis.machado@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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.