From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: damien.hedde@greensocs.com,
Peter Maydell <peter.maydell@linaro.org>,
luis.machado@linaro.org, qemu-devel@nongnu.org,
"open list:ARM TCG CPUs" <qemu-arm@nongnu.org>,
alan.hayward@arm.com
Subject: Re: [PATCH v2 11/14] target/arm: default SVE length to 64 bytes for linux-user
Date: Fri, 06 Dec 2019 14:52:42 +0000 [thread overview]
Message-ID: <87fthx7bgl.fsf@linaro.org> (raw)
In-Reply-To: <cc54dbf6-01ed-f92d-5088-efe7e917b870@linaro.org>
Richard Henderson <richard.henderson@linaro.org> writes:
> On 12/5/19 9:31 AM, Alex Bennée wrote:
>>
>> Richard Henderson <richard.henderson@linaro.org> writes:
>>
>>> On 11/30/19 8:45 AM, Alex Bennée wrote:
>>>> The Linux kernel chooses the default of 64 bytes for SVE registers on
>>>> the basis that it is the largest size that won't grow the signal
>>>> frame. When debugging larger sizes are also unwieldy in gdb as each
>>>> zreg will take over a page of terminal to display.
>>>>
>>>> The user can of course always specify a larger size with the
>>>> sve-max-vq property on the command line:
>>>>
>>>> -cpu max,sve-max-vq=16
>>>>
>>>> This should not make any difference to SVE enabled software as the SVE
>>>> is of course vector length agnostic.
>>>>
>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>> ---
>>>> target/arm/cpu64.c | 3 +++
>>>> 1 file changed, 3 insertions(+)
>>>
>>> 6 is the largest size that doesn't grow the signal frame.
>>> I imagine 4 was chosen because that's the only real hw atm.
>>>
>>>> + /* Default sve-max-vq to a reasonable numer */
>>>> + cpu->sve_max_vq = 4;
>>>
>>> I also agree that we should match the kernel, but this is not the right way.
>>> Changing max vq is not the same as changing the default vq.
>>>
>>> You should change the value of env->vfp.zcr_el[1] in arm_cpu_reset(), and the
>>> user can increase the length with prctl(2) as they would be able to on real
>>> hardware that would have support for longer vector lengths.
>>
>> No the intention is to default to a lower max VQ because...
>>
>>> Also, I don't think you should mix this up with gdb stuff.
>>
>> it is what we use for sizing the registers for the gdbstub. The other
>> option would be to use the effective zcr_el1 value at the time of the
>> gdbstub connecting but then things will go horribly wrong if the user
>> execute a prctl and widens their size.
>
> Why would you care about the size of the registers as passed by default? You
> shouldn't need or want to change that default to make gdbstub work.
>
> The gdbstub should be passing along the vq value (via the "vg" pseudo-register,
> iirc), and gdb should be working out what to display based on that.
>
> If that isn't happening, and you are only changing the default so that gdb
> quits displaying massive registers when they aren't in use, then you're doing
> something wrong with gdb and gdbstub.
Currently the upstream gdbserver sends the XML based on the VL at start-up. It
doesn't handle changes in the vector size.
--
Alex Bennée
next prev parent reply other threads:[~2019-12-06 16:14 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-30 8:45 [PATCH v2 00/14] gdbstub refactor and SVE support Alex Bennée
2019-11-30 8:45 ` [PATCH v2 01/14] gdbstub: make GDBState static and have common init function Alex Bennée
2019-12-02 2:14 ` Richard Henderson
2019-12-02 14:35 ` Damien Hedde
2019-11-30 8:45 ` [PATCH v2 02/14] gdbstub: stop passing GDBState * around and use global Alex Bennée
2019-12-02 2:16 ` Richard Henderson
2019-12-02 15:25 ` Damien Hedde
2019-11-30 8:45 ` [PATCH v2 03/14] gdbstub: move str_buf to GDBState and use GString Alex Bennée
2019-12-02 15:26 ` Damien Hedde
2019-12-03 12:49 ` Damien Hedde
2019-11-30 8:45 ` [PATCH v2 04/14] gdbstub: move mem_buf to GDBState and use GByteArray Alex Bennée
2019-12-03 11:11 ` Damien Hedde
2019-11-30 8:45 ` [PATCH v2 05/14] gdbstub: add helper for 128 bit registers Alex Bennée
2019-12-01 20:02 ` Philippe Mathieu-Daudé
2019-12-02 2:19 ` Richard Henderson
2019-11-30 8:45 ` [PATCH v2 06/14] target/arm: use gdb_get_reg helpers Alex Bennée
2019-12-01 20:05 ` Philippe Mathieu-Daudé
2019-12-02 10:05 ` Alan Hayward
2019-12-05 17:58 ` Alex Bennée
2019-12-02 2:20 ` Richard Henderson
2019-11-30 8:45 ` [PATCH v2 07/14] target/m68k: " Alex Bennée
2019-11-30 10:58 ` Laurent Vivier
2019-11-30 8:45 ` [PATCH v2 08/14] gdbstub: extend GByteArray to read register helpers Alex Bennée
2019-12-02 2:24 ` Richard Henderson
2019-11-30 8:45 ` [PATCH v2 09/14] target/arm: prepare for multiple dynamic XMLs Alex Bennée
2019-12-02 18:26 ` Richard Henderson
2019-11-30 8:45 ` [PATCH v2 10/14] target/arm: explicitly encode regnum in our XML Alex Bennée
2019-11-30 8:45 ` [PATCH v2 11/14] target/arm: default SVE length to 64 bytes for linux-user Alex Bennée
2019-12-02 2:41 ` Richard Henderson
2019-12-05 17:31 ` Alex Bennée
2019-12-05 19:36 ` Richard Henderson
2019-12-06 14:52 ` Alex Bennée [this message]
2019-11-30 8:46 ` [PATCH v2 12/14] target/arm: generate xml description of our SVE registers Alex Bennée
2019-12-02 18:44 ` Richard Henderson
2019-11-30 8:46 ` [PATCH v2 13/14] tests/guest-debug: add a simple test runner Alex Bennée
2019-12-02 18:50 ` Richard Henderson
2019-11-30 8:46 ` [PATCH v2 14/14] tests/tcg: add a gdbstub testcase for SVE registers Alex Bennée
2019-11-30 9:33 ` [PATCH v2 00/14] gdbstub refactor and SVE support no-reply
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=87fthx7bgl.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=alan.hayward@arm.com \
--cc=damien.hedde@greensocs.com \
--cc=luis.machado@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 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).