qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] gdbstub: Add support for MTE in system mode
@ 2024-07-22 16:07 Gustavo Romero
  2024-07-22 16:07 ` [PATCH 1/4] gdbstub: Use specific MMU index when probing MTE addresses Gustavo Romero
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Gustavo Romero @ 2024-07-22 16:07 UTC (permalink / raw)
  To: qemu-devel, philmd, alex.bennee, richard.henderson
  Cc: peter.maydell, gustavo.romero

This patchset makes handle_q_memtag, handle_q_isaddresstagged, and
handle_Q_memtag stubs build for system mode, allowing all GDB
'memory-tag' subcommands to work with QEMU gdbstub on aarch64 system
mode.

It also extends the MTE gdbstub tests to run in system mode, sharing the
tests between user mode and system mode.

For running the tests, a GDB that supports MTE for baremetal targets is
necessary. The patch for this support is currently under review [0].
For convenience, this patch is available in this GDB branch [1], and GDB
can be built and installed into a /tmp directory in a straightforward
way. After cloning [1], in a 'build' directory, configure GDB to build:

 $ git clone --depth 1 https://github.com/gromero/binutils-gdb.git --branch mte_baremetal mte_baremetal && cd mte_baremetal
 $ mkdir build && cd build
 $ ../configure --disable-binutils --disable-ld --disable-gold --disable-gas --disable-sim --disable-gprof --disable-gprofng --with-python=python3 --enable-libctf --enable-unit-tests --prefix=/tmp/gdb --with-additional-debug-dirs=/usr/lib/debug --enable-targets=all
 $ make -j 32
 $ make install

Configure QEMU, specifying where GDB is installed. For example:

 $ cd build
 $ ../configure --target-list=aarch64-linux-user,aarch64-softmmu --disable-docs --gdb=/tmp/gdb/bin/gdb
 $ make -j 32
 $ cd..

And, finally, run the MTE gdbstub tests for system mode:

 $ make -C build -j 32 run-tcg-tests-aarch64-softmmu


Cheers,
Gustavo

[0] https://sourceware.org/pipermail/gdb-patches/2024-July/210584.html
[1] https://github.com/gromero/binutils-gdb/tree/mte_baremetal

Gustavo Romero (4):
  gdbstub: Use specific MMU index when probing MTE addresses
  gdbstub: Add support for MTE in system mode
  tests/guest-debug: Support passing arguments to the GDB test script
  tests/tcg/aarch64: Extend MTE gdbstub tests to system mode

 target/arm/gdbstub64.c                    | 21 +++++++----
 tests/guest-debug/run-test.py             |  4 +++
 tests/tcg/aarch64/Makefile.softmmu-target | 36 +++++++++++++++++--
 tests/tcg/aarch64/Makefile.target         |  3 +-
 tests/tcg/aarch64/gdbstub/test-mte.py     | 44 +++++++++++++++--------
 tests/tcg/aarch64/system/boot.S           | 26 ++++++++++++--
 tests/tcg/aarch64/system/kernel.ld        |  5 +++
 tests/tcg/aarch64/system/mte.c            | 40 +++++++++++++++++++++
 8 files changed, 151 insertions(+), 28 deletions(-)
 create mode 100644 tests/tcg/aarch64/system/mte.c

-- 
2.34.1



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

end of thread, other threads:[~2024-08-08  5:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 16:07 [PATCH 0/4] gdbstub: Add support for MTE in system mode Gustavo Romero
2024-07-22 16:07 ` [PATCH 1/4] gdbstub: Use specific MMU index when probing MTE addresses Gustavo Romero
2024-07-24 10:14   ` Richard Henderson
2024-07-25 14:27     ` Gustavo Romero
2024-08-08  5:07     ` Gustavo Romero
2024-07-22 16:07 ` [PATCH 2/4] gdbstub: Add support for MTE in system mode Gustavo Romero
2024-07-24 10:19   ` Richard Henderson
2024-07-22 16:07 ` [PATCH 3/4] tests/guest-debug: Support passing arguments to the GDB test script Gustavo Romero
2024-07-25 20:38   ` Alex Bennée
2024-08-08  5:07     ` Gustavo Romero
2024-07-22 16:07 ` [PATCH 4/4] tests/tcg/aarch64: Extend MTE gdbstub tests to system mode Gustavo Romero
2024-07-25 23:17   ` Richard Henderson
2024-08-08  5:08     ` Gustavo Romero

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).