From: Peter Maydell <peter.maydell@linaro.org>
To: Vacha Bhavsar <vacha.bhavsar@oss.qualcomm.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Huth" <thuth@redhat.com>
Subject: Re: [PATCH v5 1/4] target/arm: Increase MAX_PACKET_LENGTH for SME ZA
Date: Tue, 19 Aug 2025 10:14:32 +0100 [thread overview]
Message-ID: <CAFEAcA8NxNssTqcE5rgeZfetVKbtHXkGEVLfHP0xyFYmayPU1A@mail.gmail.com> (raw)
In-Reply-To: <20250811193654.4012878-2-vacha.bhavsar@oss.qualcomm.com>
On Mon, 11 Aug 2025 at 20:37, Vacha Bhavsar
<vacha.bhavsar@oss.qualcomm.com> wrote:
>
> This patch increases the value of the MAX_PACKET_LEGNTH to
> 131104 from 4096 to allow the GDBState.line_buf to be large enough
> to accommodate the full contents of the SME ZA storage when the
> vector length is maximal. This is in preparation for a related
> patch that allows SME register visibility through remote GDB
> debugging.
>
> Signed-off-by: Vacha Bhavsar <vacha.bhavsar@oss.qualcomm.com>
> ---
> Changes since v4:
> - the value for MAX_PACKET_LENGTH is changed from 131100 to
> 131104 to align with a similar update made to gdbserver
> ---
> gdbstub/internals.h | 22 +++++++++++++++++++++-
> 1 file changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/gdbstub/internals.h b/gdbstub/internals.h
> index bf5a5c6302..87f64b6318 100644
> --- a/gdbstub/internals.h
> +++ b/gdbstub/internals.h
> @@ -11,7 +11,27 @@
>
> #include "exec/cpu-common.h"
>
> -#define MAX_PACKET_LENGTH 4096
> +/*
> +* Most "large" transfers (e.g. memory reads, feature XML
> +* transfer) have mechanisms in the gdb protocol for splitting
> +* them. However, register values in particular cannot currently
> +* be split. This packet size must therefore be at least big enough
> +* for the worst-case register size. Currently that is Arm SME
> +* ZA storage with a 256x256 byte value. We also must account
> +* for the conversion from raw data to hex in gdb_memtohex(),
> +* which writes 2 * size bytes, and for other protocol overhead
> +* including command, register number and checksum which add
> +* another 4 bytes of overhead. However, to be consistent with
> +* the changes made in gdbserver to address this same requirement,
> +* we add a total of 32 bytes to account for protocol overhead
> +* (unclear why specifically 32 bytes), bringing the value of
> +* MAX_PACKET_LENGTH to 2 * 256 * 256 + 32 = 131104.
> +*
> +* The commit making this change for gdbserver can be found here:
> +* https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=
> +* b816042e88583f280ad186ff124ab84d31fb592b
> +*/
> +#define MAX_PACKET_LENGTH 131104
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
next prev parent reply other threads:[~2025-08-19 9:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 19:36 [PATCH v5 0/4] target/arm: Added support for SME register exposure to GDB Vacha Bhavsar
2025-08-11 19:36 ` [PATCH v5 1/4] target/arm: Increase MAX_PACKET_LENGTH for SME ZA Vacha Bhavsar
2025-08-19 9:14 ` Peter Maydell [this message]
2025-08-11 19:36 ` [PATCH v5 2/4] target/arm: Change GDBState's line_buf to a GString Vacha Bhavsar
2025-08-12 11:32 ` Peter Maydell
2025-08-12 19:31 ` Vacha Bhavsar
2025-08-11 19:36 ` [PATCH v5 3/4] target/arm: Added support for SME register exposure to Vacha Bhavsar
2025-08-19 9:04 ` Peter Maydell
2025-08-21 21:37 ` Vacha Bhavsar
2025-08-22 12:27 ` Peter Maydell
2025-08-26 18:52 ` Vacha Bhavsar
2025-08-11 19:36 ` [PATCH v5 4/4] target/arm: Added test case for SME register exposure Vacha Bhavsar
2025-08-19 9:13 ` Peter Maydell
2025-08-22 17:32 ` Vacha Bhavsar
2025-08-23 18:13 ` Peter Maydell
2025-08-26 18:51 ` Vacha Bhavsar
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=CAFEAcA8NxNssTqcE5rgeZfetVKbtHXkGEVLfHP0xyFYmayPU1A@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=vacha.bhavsar@oss.qualcomm.com \
/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 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).