All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org,  qemu-devel@nongnu.org,
	 Richard Henderson <richard.henderson@linaro.org>,
	 Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Subject: Re: [PATCH v2 2/6] target/arm: Report correct vector width in gdbstub when SME present
Date: Thu, 29 Jan 2026 14:36:34 +0000	[thread overview]
Message-ID: <87o6mc8ozx.fsf@draig.linaro.org> (raw)
In-Reply-To: <20260129113455.1283266-3-peter.maydell@linaro.org> (Peter Maydell's message of "Thu, 29 Jan 2026 11:34:51 +0000")

Peter Maydell <peter.maydell@linaro.org> writes:

> Our gdbstub implementation of the org.gnu.gdb.aarch64.sve feature
> doesn't account for SME correctly.  We always report the Zn vector
> registers with a width based on the maximum SVE vector register size,
> even though SME's maximum size could be larger.
>
> This is particularly bad in the case of a CPU with SME but not SVE,
> because there the SVE vector width will be zero.  If we report the Zn
> registers in the XML as having a zero width then gdb falls over with
> an internal error:
>
>  (gdb) target remote :1234
>  Remote debugging using :1234
>  /build/gdb-1WjiBe/gdb-15.0.50.20240403/gdb/aarch64-tdep.c:3066: internal-error: aarch64_pseudo_register_type: bad register number 160
>  A problem internal to GDB has been detected,
>  further debugging may prove unreliable.
>
> Report the Zn registers with their correct size.  This matches how we
> already handle the 'vg' pseudoregister in org.gnu.gdb.aarch64.sve: we
> call sve_vqm1_for_el(), which returns the vector size accounting for
> SME, not the pure SVE vector size.
>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  parent reply	other threads:[~2026-01-29 14:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29 11:34 [PATCH v2 0/6] target/arm: Allow SME-only TCG CPUs Peter Maydell
2026-01-29 11:34 ` [PATCH v2 1/6] target/arm: Account for SME in aarch64_sve_narrow_vq() assertion Peter Maydell
2026-01-29 11:43   ` Philippe Mathieu-Daudé
2026-01-29 14:25   ` Alex Bennée
2026-02-02  5:21   ` Richard Henderson
2026-01-29 11:34 ` [PATCH v2 2/6] target/arm: Report correct vector width in gdbstub when SME present Peter Maydell
2026-01-29 11:44   ` Philippe Mathieu-Daudé
2026-01-29 14:36   ` Alex Bennée [this message]
2026-01-29 11:34 ` [PATCH v2 3/6] target/arm: Handle SME-only CPUs in sve_vqm1_for_el_sm() Peter Maydell
2026-01-29 14:56   ` Alex Bennée
2026-02-02  5:31   ` Richard Henderson
2026-01-29 11:34 ` [PATCH v2 4/6] target/arm: Handle SME-without-SVE on change of EL Peter Maydell
2026-01-29 11:47   ` Philippe Mathieu-Daudé
2026-01-29 14:57   ` Alex Bennée
2026-01-29 11:34 ` [PATCH v2 5/6] target/arm: Squash FEAT_SME_FA64 if FEAT_SVE is not present Peter Maydell
2026-02-02  5:32   ` Richard Henderson
2026-01-29 11:34 ` [PATCH v2 6/6] target/arm: Permit configurations with SME but not SVE Peter Maydell
2026-01-29 15:59   ` Alex Bennée

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=87o6mc8ozx.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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.