On 10-09-2024 05:53 pm, Peter Maydell wrote:
On Tue, 10 Sept 2024 at 12:57, Ganapatrao Kulkarni
<gankulka...@os.amperecomputing.com> wrote:
On 16-07-2024 09:15 pm, Peter Maydell wrote:
Since Cornelia first wrote the patch this is based on, we've
landed gdbstub support for MTE (so gdb can find out which
addresses in the memory map have tags and read and write
those tags). So I think the KVM MTE support now also needs to
handle that. (See aarch64_cpu_register_gdb_commands() in
target/arm/gdbstub64.c.)
I looked at this code and it looks like, complete code is under
ifdef CONFIG_USER_ONLY and for kvm(target aarch64-softmmu) this is not
getting enabled. Are you asking to remove these ifdef and make
mte-gdbstub commands available for the KVM mode as well?
The system mode support for mte gdbstub is just about
to land. The current patchset is this one:
https://patchew.org/QEMU/20240906143316.657436-1-gustavo.rom...@linaro.org/
Thanks.
I applied these patches to qemu and compiled gdb as said in the
cover-letter. Below is the log of the run, help me to interpret the logs.
[root@sut01sys-r214 mte-qemu]# make -C build -j 32
run-tcg-tests-aarch64-softmmu
make: Entering directory '/home/ganapat/upstream/mte-qemu/build'
BUILD aarch64-softmmu guest-tests
RUN aarch64-softmmu guest-tests
TEST mte on aarch64
TEST hello on aarch64
TEST interrupt on aarch64
TEST memory on aarch64
TEST memory-sve on aarch64
TEST hello-with-libbb.so on aarch64
TEST interrupt-with-libbb.so on aarch64
TEST memory-with-libbb.so on aarch64
TEST hello-with-libempty.so on aarch64
TEST interrupt-with-libempty.so on aarch64
TEST memory-with-libempty.so on aarch64
TEST interrupt-with-libinline.so on aarch64
TEST hello-with-libinline.so on aarch64
TEST memory-with-libinline.so on aarch64
TEST hello-with-libinsn.so on aarch64
TEST memory-with-libinsn.so on aarch64
TEST interrupt-with-libinsn.so on aarch64
TEST hello-with-libmem.so on aarch64
TEST interrupt-with-libmem.so on aarch64
TEST hello-with-libsyscall.so on aarch64
TEST memory-with-libmem.so on aarch64
TEST interrupt-with-libsyscall.so on aarch64
TEST softmmu gdbstub support on aarch64
TEST memory-with-libsyscall.so on aarch64
TEST softmmu gdbstub support on aarch64
TEST softmmu gdbstub untimely packets on aarch64
TEST softmmu gdbstub support on aarch64
TEST gdbstub MTE support on aarch64
TEST memory-record on aarch64
qemu-system-aarch64: -gdb
unix:path=/tmp/tmp80lbp057qemu-gdbstub/gdbstub.socket,server=on: info:
QEMU waiting for connection on:
disconnected:unix:/tmp/tmp80lbp057qemu-gdbstub/gdbstub.socket,server=on
qemu-system-aarch64: -gdb
unix:path=/tmp/tmp8h7kx8kyqemu-gdbstub/gdbstub.socket,server=on: info:
QEMU waiting for connection on:
disconnected:unix:/tmp/tmp8h7kx8kyqemu-gdbstub/gdbstub.socket,server=on
qemu-system-aarch64: -gdb
unix:path=/tmp/tmpo0448vk6qemu-gdbstub/gdbstub.socket,server=on: info:
QEMU waiting for connection on:
disconnected:unix:/tmp/tmpo0448vk6qemu-gdbstub/gdbstub.socket,server=on
qemu-system-aarch64: -gdb
unix:path=/tmp/tmplvwd79e3qemu-gdbstub/gdbstub.socket,server=on: info:
QEMU waiting for connection on:
disconnected:unix:/tmp/tmplvwd79e3qemu-gdbstub/gdbstub.socket,server=on
qemu-system-aarch64: -gdb
unix:path=/tmp/tmpv1t2ffjfqemu-gdbstub/gdbstub.socket,server=on: info:
QEMU waiting for connection on:
disconnected:unix:/tmp/tmpv1t2ffjfqemu-gdbstub/gdbstub.socket,server=on
TEST memory-replay on aarch64
qemu-system-aarch64: QEMU: Terminated via GDBstub
qemu-system-aarch64: QEMU: Terminated via GDBstub
GREP file untimely-packet.gdb.err
qemu-system-aarch64: QEMU: Terminated via GDBstub
qemu-system-aarch64: QEMU: Terminated via GDBstub
make: Leaving directory '/home/ganapat/upstream/mte-qemu/build'
[root@sut01sys-r214 mte-qemu]#
Last few lines of untimely-packet.gdb.err below:
[remote] Packet received:
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
[24 bytes omitted]
[remote] Sending packet: $qfThreadInfo#bb
[remote] Received Ack
[remote] Packet received: mp01.01
[remote] Sending packet: $qsThreadInfo#c8
[remote] Received Ack
[remote] Packet received: l
[remote] Sending packet: $p56#db
[remote] Received Ack
[remote] Packet received: 000000000000ffff
[remote] packet_ok: Packet p (fetch-register) is supported
[remote] Sending packet: $p57#dc
[remote] Received Ack
[remote] Packet received: 000000000000ffff
[remote] Sending packet: $m400027b0,4#8c
[remote] Received Ack
[remote] Packet received: 80c2ff10
[remote] Sending packet: $m400027ac,4#be
[remote] Received Ack
[remote] Packet received: 1f2003d5
[remote] Sending packet: $m400027b0,4#8c
[remote] Received Ack
[remote] Packet received: 80c2ff10
[remote] Sending packet: $qSymbol::#5b
[remote] Received Ack
[remote] Packet received:
[remote] packet_ok: Packet qSymbol (symbol-lookup) is NOT supported
[remote] start_remote_1: exit
[remote] Sending packet: $D;1#b0
[remote] Received Ack
[remote] Packet received: OK
--
Thanks,
Ganapat/GK