All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Gustavo Romero <gustavo.romero@linaro.org>
Cc: qemu-devel@nongnu.org,  philmd@linaro.org,
	 peter.maydell@linaro.org, richard.henderson@linaro.org
Subject: Re: [PATCH v2 0/9] Add MTE stubs for aarch64 user mode
Date: Mon, 17 Jun 2024 10:50:12 +0100	[thread overview]
Message-ID: <87h6drew4r.fsf@draig.linaro.org> (raw)
In-Reply-To: <29b9c8e6-055d-f895-f178-dddd407bdc69@linaro.org> (Gustavo Romero's message of "Mon, 17 Jun 2024 04:02:13 -0300")

Gustavo Romero <gustavo.romero@linaro.org> writes:

> Hi Alex,
>
> On 6/14/24 12:49 PM, Alex Bennée wrote:
>> Gustavo Romero <gustavo.romero@linaro.org> writes:
>> 
>>> This patchset adds the stubs necessary to support GDB memory tagging
>>> commands on QEMU aarch64 user mode.
>>>
>>> These new stubs handle the qIsAddressTagged, qMemTag, and QMemTag
>>> packets, which allow GDB memory tagging subcommands 'check',
>>> 'print-allocation-tag', and 'set-allocation-tag' to work. The remaining
>>> memory tagging commands ('print-logical-tag' and 'with-logical-tag')
>>> will also work, but they don't rely on any stub because they perform
>>> local operations.
>>>
>>> Since the memory tagging stubs are not common to all architectures, this
>>> patchset also introduces three functions: gdb_extend_qsupported_features,
>>> gdb_extend_query_table, and gdb_extend_set_table. These functions can be
>>> used to extend the target-specific 'qSupported' feature string and the
>>> handlers for the 'q' (query) and 'Q' (set) packets. These new functions
>>> are used to add the MTE stubs for the aarch64 gdbstub.
>>>   Note that this patchset requires a GDB that supports the
>>> qIsAddressTagged packet (recently added to GDB), so the gdbstub MTE
>>> tests introduced by it must be run using GDB's master branch, since the
>>> GDB in the distros hasn't picked up the change yet.
>>>
>>> Once GDB is built and installed locally, the tests can be exercised, for
>>> example, this way:
>>>
>>> make GDB=~/.local/bin/gdb run-tcg-tests-aarch64-linux-user -j 32
>> It looks like there might be some BSD build failures as well:
>>    https://gitlab.com/stsquad/qemu/-/pipelines/1332635371/failures
>
> I fixed the build for the BSD target in v3, however I think that the GDB in
> the test containers need to be bumped to GDB 15 so the MTE tests can pass,
> because support for IsAddressTagged packet is necessary. GDB 15 branch
> is created by it's not released yet, so I don't know to proceed..

Two potential approaches, you could extend the configure segment:

if test -n "$gdb_bin"; then
    gdb_version=$($gdb_bin --version | head -n 1)
    if version_ge ${gdb_version##* } 9.1; then
        gdb_arches=$($python "$source_path/scripts/probe-gdb-support.py" $gdb_bin)
    else
        gdb_bin=""
    fi
fi

and set a variable exported to config-host.mak to then test in the tcg
test makefiles.

Or you could implement a gdb-version-test command in
tests/tcg/Makefile.target which you could use like the existing
cc-test/cc-option commands to extend config-cc.mak and use that to gate
the tests.

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2024-06-17  9:50 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 17:20 [PATCH v2 0/9] Add MTE stubs for aarch64 user mode Gustavo Romero
2024-06-13 17:20 ` [PATCH v2 1/9] gdbstub: Clean up process_string_cmd Gustavo Romero
2024-06-14 11:24   ` Alex Bennée
2024-06-13 17:20 ` [PATCH v2 2/9] gdbstub: Move GdbCmdParseEntry into a new header file Gustavo Romero
2024-06-14 11:25   ` Alex Bennée
2024-06-13 17:20 ` [PATCH v2 3/9] gdbstub: Add support for target-specific stubs Gustavo Romero
2024-06-14 11:27   ` Alex Bennée
2024-06-17  6:33     ` Gustavo Romero
2024-06-17  9:41       ` Alex Bennée
2024-06-13 17:20 ` [PATCH v2 4/9] target/arm: Fix exception case in allocation_tag_mem_probe Gustavo Romero
2024-06-14 11:29   ` Alex Bennée
2024-06-13 17:20 ` [PATCH v2 5/9] target/arm: Make some MTE helpers widely available Gustavo Romero
2024-06-13 17:32   ` Philippe Mathieu-Daudé
2024-06-13 18:13     ` Gustavo Romero
2024-06-14 12:34       ` Philippe Mathieu-Daudé
2024-06-17  6:37         ` Gustavo Romero
2024-06-13 17:21 ` [PATCH v2 6/9] target/arm: Factor out code for setting MTE TCF0 field Gustavo Romero
2024-06-13 17:35   ` Philippe Mathieu-Daudé
2024-06-13 18:15     ` Gustavo Romero
2024-06-14  9:02       ` Philippe Mathieu-Daudé
2024-06-17  6:56         ` Gustavo Romero
2024-06-14 11:21   ` Alex Bennée
2024-06-13 17:21 ` [PATCH v2 7/9] gdbstub: Make get cpu and hex conversion functions non-internal Gustavo Romero
2024-06-14 11:34   ` Alex Bennée
2024-06-13 17:21 ` [PATCH v2 8/9] gdbstub: Add support for MTE in user mode Gustavo Romero
2024-06-14 10:51   ` Alex Bennée
2024-06-14 16:16     ` Gustavo Romero
2024-06-13 17:21 ` [PATCH v2 9/9] tests/tcg/aarch64: Add MTE gdbstub tests Gustavo Romero
2024-06-14 11:42   ` Alex Bennée
2024-06-14 15:58     ` Gustavo Romero
2024-06-14 15:49 ` [PATCH v2 0/9] Add MTE stubs for aarch64 user mode Alex Bennée
2024-06-14 16:01   ` Gustavo Romero
2024-06-17  7:02   ` Gustavo Romero
2024-06-17  9:50     ` Alex Bennée [this message]
2024-06-24  5:40       ` Gustavo Romero

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=87h6drew4r.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=gustavo.romero@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@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.