From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8jy3MPzqe2mwfRwAWB0awg (envelope-from ) for ; Thu, 29 Jan 2026 18:19:24 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=msgYhc6C; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B69611E089; Thu, 29 Jan 2026 18:19:24 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id EED041E089 for ; Thu, 29 Jan 2026 18:19:23 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 60D264BAD17D for ; Thu, 29 Jan 2026 23:19:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 60D264BAD17D Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=msgYhc6C Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by sourceware.org (Postfix) with ESMTPS id 6D7394BA2E1F for ; Thu, 29 Jan 2026 23:18:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D7394BA2E1F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6D7394BA2E1F Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2001:4860:4864:20::34 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1769728736; cv=pass; b=t9CYKpK5knvdbj/iEC/YvauTRDiZ+RSnkR00Qah03N7qLXEMUr4LRgvy3tLutnN86I+ifpxIdqqAHml/xFGMeT8JvZ0BIW/1JV/I87bMMhpXNDWnwV6EpQde4TtTKSOaR08q9iHEo46VTwJ+pOxQVZkj0CyWRUkFQ8hItVfSTwc= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1769728736; c=relaxed/simple; bh=akra+eYwB21n5BilXricM9uYgvz9BjcOyL03nSur2c8=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=tLXxk4IBFmzqbRPX6oS4etJMHbszy310a9NcqPaO70ZO2LzCkPT0z4ml64c8MRhZKIn/IIpMmveQgWLl7BzPXL4vLqV4zcWhrgDBxVu5I4BBH9MxgKE/B7wWVYJi6aKSy2wJ/rfBAhwNBOSarSRtEliEmLz8HNNjEd0nxuQX0nM= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D7394BA2E1F Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-4042fe53946so559263fac.3 for ; Thu, 29 Jan 2026 15:18:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769728736; cv=none; d=google.com; s=arc-20240605; b=OlR0DSXb9V8y7xOUCyBDD0ZNNjnk+e8NuXnqG11k/GXeO7q1vocLwpz9EfvrTYN/io m+7G8fqeMJhkNXPgZDnU+mc24mjHFqYda0wxj9VCppGhoipwgtDSgNJv93AwgZAGIiK5 zN+RB8508c0p6GXVNv/1ZbfgjJYJKh6ObuL/x45i8XuXLEf5x+XSgXjy8wqwpTijEm5V J92a8DfooqdvzvauCgv7/erAvA4BbKOOs1dvlCW3cHoM5mTZ8LV8vlZlaf6PgegIXmlv 7ZF3pATAOEsvuwBWDsQ9TgY/fM9v/aJXOl9T3i17J9yRyazMigy1P/mQm/fKzfmkMBbh vkfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=qhsrglDcT9akCUTTQMYf7cjVWgG1FY30kvcoOXgrw0Q=; fh=H6u37GeKj5U9ewNN2PANbu/1Fi0nvoqg8U/N2SyWiF4=; b=IB0EPCKpAdbrkpoZf6W+oqxA5bRUwumM+fQsSXXOk8yEp8KGwAFmL0WLYrRqVJkdoY qMw5SyjlT5tkZ+TjDSFVdSwJXQypUWupp/JjB2AY3XM6snZrXXqk/zssoprgHkg165FL mC804TbXYb51uBjz1WW8FgpudmVgiNRwzqFDGdy6ccIFoTCWV7TnZFvcL894HWYEjYkC op0D7sRFMeLNcgJ24jFxJyJomBnkHT9B1Bt7BDtc/T62i9l9Kphe6O29pBzt32V/2qst GknxglQ7jJdkgEKRpAv5C0gEAcRfyTNAuj0T2RfSflVIdpuzA7NqYa3oq4ANG1HXCZya skXw==; darn=sourceware.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769728736; x=1770333536; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=qhsrglDcT9akCUTTQMYf7cjVWgG1FY30kvcoOXgrw0Q=; b=msgYhc6CvDDHlyCtyV78nQ6rSdsSIlY8F0V6Jm+SGzipOhQXO/ObwzCQVquzNlB+Pn xq/0jKk0PIfXpJB+a9wOXnLYYhfpKFZz1PykXKT9d7MoNjlKgnr+yI+OMoF765coTA5h K+8ZdGirO64PvHBFpVdEUdgBgwpM7Y/XTuAxLZUtxFB526NZe56j2tmTG5VcA1W48GSd WBZxeTrfMHW2ao9u2LtGVMopMpXhO2DnnjlaoX4ZfwEGlSDW6Q6QW5nTnbY2EONxfZLS GgV2jsDbKpw/d3MA6CdGwS+BAMy4bc1iMSwBMEmiG2fT7Jljarm2ulBtCrqKGTnc3oTg 5EGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769728736; x=1770333536; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qhsrglDcT9akCUTTQMYf7cjVWgG1FY30kvcoOXgrw0Q=; b=uQg+6iDt4SpQMmuFC5w2vpuoJKPe2JffGthcXZk2tGRjOn4Z2CBsACdm9miH4eT8zU eFd2GFotZ/DWQQ2cPul9/D2VCvSb2WtFsdgwlqDW6F+qY6ma5ORMDwiLn/I7MAmB5iq1 k3GxvLTAaUTutPLHon7qTLLix39m615B+NsQEz9TphB88MysPD5u4kpUcYpEcl+Tc4K3 W2s3fS5wNPT2xVnKG6qLKAv3Jl8fxnm4tAT6d1PomlAxu0LsQ4XuJmiTLmcN5kIUZ4Fv OglOZ2UPXgJ0apXj6iTYovpxMD6gC2pv+Y3pua49ztvx3Y2fz3iVmSQhlYzUKtfJs7SC TtEQ== X-Gm-Message-State: AOJu0YxpysiCzAjJUxepezHgH750cm3jvNzOWfdvjhZH2M+JYyLxhjR5 Rcaq32/VYyCnHiWJxAU8hFjJqhHYUeHq73ekfVjegk2rhduhtT7E0KYhhVls0c2fPEMccOKNC0l Apo8cIYfvGC1y9XrQ0nYsYaf5Ueiq65s= X-Gm-Gg: AZuq6aLjRhdojKLDeL2kA3oM2ElI+9Kn8qA5cwq4Psak0smVSykrSmngzEo/jet0dsP lrM5xQK8UXtBkzNupPFOD7yBSEmiwd7tt3mSNAJ7TIX3dhV88A97zSOZLCzdY9i9U9OAs3020hk Grpbu2P7zZw2Vve9mu3iIQQir6Bp+kLopA0XAo5cat+qrhVz+tWW52Y5xk6kQrJutrCAKLRZ831 u2IBX2O8Qe23S2Z4l35y6xe+dpNl75d98LPyZLjgdWNjOuQmY0nSsVeGBRutB8WhlWicDJt X-Received: by 2002:a05:6820:134a:b0:662:f543:5d35 with SMTP id 006d021491bc7-6630f5166c1mr502369eaf.80.1769728734068; Thu, 29 Jan 2026 15:18:54 -0800 (PST) MIME-Version: 1.0 References: <20260129181122.1426596-1-peter.maydell@linaro.org> In-Reply-To: <20260129181122.1426596-1-peter.maydell@linaro.org> From: Luis Date: Thu, 29 Jan 2026 23:13:11 +0000 X-Gm-Features: AZwV_Qibs5AQVuv3o-_RrP3mHTQQRzVD3oEDvxz80yvmLu01_MQzvymq53weLgY Message-ID: Subject: Re: [PATCH] docs: Clarify gdb remote protocol AArch64 SVE and SME handling To: Peter Maydell Cc: gdb-patches@sourceware.org, Thiago Jung Bauermann , Manos Pitsidianakis Content-Type: multipart/alternative; boundary="0000000000008b04d706498f1441" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org --0000000000008b04d706498f1441 Content-Type: text/plain; charset="UTF-8" On Thu, Jan 29, 2026, 18:11 Peter Maydell wrote: > The documentation of the AArch64 target features for the gdb remote > protocol has some areas where it is unclear about SVE and SME: > > * it doesn't say what to do if the target has only SME > > * it isn't clear about what the org.gnu.gdb.aarch64.sve vector > register size should be when both SME and SVE are present > > Clarify/correct the documentation: > > * org.gnu.gdb.aarch64.sve is effectively "the feature for the z > vector registers", and must be provided even when the target only > implements SME (because the z registers exist in an SME only CPU) > > * the z register size and the 'vg' pseudoregister in > org.gnu.gdb.aarch64.sve follow the architectural "effective SVE > vector length", which might be either the non-streaming SVE vector > length or the streaming SVE vector length > > Reviewed-by: Thiago Jung Bauermann > --- > gdb/doc/gdb.texinfo | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index 80f49e21b7e..711a45435ef 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -49742,7 +49742,8 @@ Extra registers are allowed in this feature, but > they will not affect > @subsubsection AArch64 SVE registers feature > > The @samp{org.gnu.gdb.aarch64.sve} feature is optional. If present, > -it means the target supports the Scalable Vector Extension and must > contain > +it means the target supports either the Scalable Vector Extension (SVE) or > +the Scalable Matrix Extension (SME) and must contain > the following registers: > > @itemize @minus > @@ -49780,6 +49781,14 @@ vector registers from the > @samp{org.gnu.gdb.aarch64.fpu} feature. > The first 128 bits of the @samp{z} registers overlap the 128 bits of the > @samp{v} registers, so changing one will trigger a change to the other. > > +@samp{vg} represents the size of the @samp{z} registers, and is what > +the Arm architecture defines as the ``Effective SVE vector length''. That > +means that if the target implements SME and is in streaming vector mode, > +it is the streaming vector length. If the target implements only SME and > +not SVE, and is not in streaming vector mode, then @samp{vg} is 2 > +(indicating 128-bit vectors) and the @samp{z} registers match the @samp{v} > +FPU registers. > + > For the types of the @samp{z}, @samp{p} and @samp{ffr} registers, please > check the aarch64-sve.c file. No XML file is available for this feature > because it is dynamically generated based on the current vector length. > @@ -49793,6 +49802,9 @@ aarch64-sve.c file, and should match what is > described in aarch64-fpu.xml. > Extra registers are allowed in this feature, but they will not affect > @value{GDBN}. > > +The @samp{org.gnu.gdb.aarch64.sve} feature is required when the target > also > +reports support for the @samp{org.gnu.gdb.aarch64.sme} feature. > + > @subsubsection AArch64 Pointer Authentication registers feature > > The @samp{org.gnu.gdb.aarch64.pauth} optional feature was introduced so > @@ -49948,6 +49960,10 @@ extensions of the architecture. > Extra registers are allowed in this feature, but they will not affect > @value{GDBN}. > > +Note that a target with only SME but not SVE support must still > +provide the @samp{org.gnu.gdb.aarch64.sve} feature, to expose the > +@samp{z} vector registers. > + > The @samp{org.gnu.gdb.aarch64.sme} feature is required when the target > also > reports support for the @samp{org.gnu.gdb.aarch64.sme2} feature. > > -- > 2.43.0 > Thanks. The documentation update looks OK given the current needs, but I'm not too sure about keeping the SVE feature just for the Z registers. I find that a bit confusing. It might be cleaner to clearly separate SVE and SME features, adding Z registers to a SME feature if needed when SVE is disabled. Or something similar to that. I don't feel comfortable setting this is stone before we have a patch that clarifies how this separation between SVE and SME is achieved. > --0000000000008b04d706498f1441 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jan 29, 2026, 18:11 Peter Maydel= l <peter.maydell@linaro.org<= /a>> wrote:
The documentation of= the AArch64 target features for the gdb remote
protocol has some areas where it is unclear about SVE and SME:

=C2=A0* it doesn't say what to do if the target has only SME

=C2=A0* it isn't clear about what the org.gnu.gdb.aarch64.sve vector =C2=A0 =C2=A0register size should be when both SME and SVE are present

Clarify/correct the documentation:

=C2=A0* org.gnu.gdb.aarch64.sve is effectively "the feature for the z<= br> =C2=A0 =C2=A0vector registers", and must be provided even when the tar= get only
=C2=A0 =C2=A0implements SME (because the z registers exist in an SME only C= PU)

=C2=A0* the z register size and the 'vg' pseudoregister in
=C2=A0 =C2=A0org.gnu.gdb.aarch64.sve follow the architectural "effecti= ve SVE
=C2=A0 =C2=A0vector length", which might be either the non-streaming S= VE vector
=C2=A0 =C2=A0length or the streaming SVE vector length

Reviewed-by: Thiago Jung Bauermann <
thiago.bauermann@linaro.org= >
---
=C2=A0gdb/doc/gdb.texinfo | 18 +++++++++++++++++-
=C2=A01 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 80f49e21b7e..711a45435ef 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -49742,7 +49742,8 @@ Extra registers are allowed in this feature, but th= ey will not affect
=C2=A0@subsubsection AArch64 SVE registers feature

=C2=A0The @samp{org.gnu.gdb.aarch64.sve} feature is optional.=C2=A0 If pres= ent,
-it means the target supports the Scalable Vector Extension and must contai= n
+it means the target supports either the Scalable Vector Extension (SVE) or=
+the Scalable Matrix Extension (SME) and must contain
=C2=A0the following registers:

=C2=A0@itemize @minus
@@ -49780,6 +49781,14 @@ vector registers from the @samp{org.gnu.gdb.aarch6= 4.fpu} feature.
=C2=A0The first 128 bits of the @samp{z} registers overlap the 128 bits of = the
=C2=A0@samp{v} registers, so changing one will trigger a change to the othe= r.

+@samp{vg} represents the size of the @samp{z} registers, and is what
+the Arm architecture defines as the ``Effective SVE vector length''= ;. That
+means that if the target implements SME and is in streaming vector mode, +it is the streaming vector length. If the target implements only SME and +not SVE, and is not in streaming vector mode, then @samp{vg} is 2
+(indicating 128-bit vectors) and the @samp{z} registers match the @samp{v}=
+FPU registers.
+
=C2=A0For the types of the @samp{z}, @samp{p} and @samp{ffr} registers, ple= ase
=C2=A0check the aarch64-sve.c file.=C2=A0 No XML file is available for this= feature
=C2=A0because it is dynamically generated based on the current vector lengt= h.
@@ -49793,6 +49802,9 @@ aarch64-sve.c file, and should match what is descri= bed in aarch64-fpu.xml.
=C2=A0Extra registers are allowed in this feature, but they will not affect=
=C2=A0@value{GDBN}.

+The @samp{org.gnu.gdb.aarch64.sve} feature is required when the target als= o
+reports support for the @samp{org.gnu.gdb.aarch64.sme} feature.
+
=C2=A0@subsubsection AArch64 Pointer Authentication registers feature

=C2=A0The @samp{org.gnu.gdb.aarch64.pauth} optional feature was introduced = so
@@ -49948,6 +49960,10 @@ extensions of the architecture.
=C2=A0Extra registers are allowed in this feature, but they will not affect=
=C2=A0@value{GDBN}.

+Note that a target with only SME but not SVE support must still
+provide the @samp{org.gnu.gdb.aarch64.sve} feature, to expose the
+@samp{z} vector registers.
+
=C2=A0The @samp{org.gnu.gdb.aarch64.sme} feature is required when the targe= t also
=C2=A0reports support for the @samp{org.gnu.gdb.aarch64.sme2} feature.

--
2.43.0

Thanks. The documentation update looks OK given the current needs, bu= t I'm not too sure about keeping the SVE feature just for the Z registe= rs. I find that a bit confusing.

It might be cleaner to clearly separate SVE and SME features, add= ing Z registers to a SME feature if needed when SVE is disabled. Or somethi= ng similar to that.

I do= n't feel comfortable setting this is stone before we have a patch that = clarifies how this separation between SVE and SME is achieved.
--0000000000008b04d706498f1441--