All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property
Date: Mon, 26 Jul 2021 12:07:09 +0100	[thread overview]
Message-ID: <CAFEAcA_0_cGcSDFVk+WqUS9Koi9hsQjRs7=7O1jiqQwv5fO2+w@mail.gmail.com> (raw)
In-Reply-To: <20210723203344.968563-4-richard.henderson@linaro.org>

On Fri, 23 Jul 2021 at 21:36, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Mirror the behavour of /proc/sys/abi/sve_default_vector_length
> under the real linux kernel.  We have no way of passing along
> a real default across exec like the kernel can, but this is a
> decent way of adjusting the startup vector length of a process.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/482
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  docs/system/arm/cpu-features.rst | 11 ++++++
>  target/arm/cpu.h                 |  5 +++
>  target/arm/cpu.c                 | 14 ++++++--
>  target/arm/cpu64.c               | 60 ++++++++++++++++++++++++++++++++
>  4 files changed, 88 insertions(+), 2 deletions(-)
>
> diff --git a/docs/system/arm/cpu-features.rst b/docs/system/arm/cpu-features.rst
> index c455442eaf..4ff36cc83f 100644
> --- a/docs/system/arm/cpu-features.rst
> +++ b/docs/system/arm/cpu-features.rst
> @@ -376,3 +376,14 @@ verbose command lines.  However, the recommended way to select vector
>  lengths is to explicitly enable each desired length.  Therefore only
>  example's (1), (4), and (6) exhibit recommended uses of the properties.
>
> +SVE User-mode Default Vector Length Property
> +--------------------------------------------
> +
> +For qemu-aarch64, the cpu property `sve-default-vector-length=N` is

You probably don't want single-backticks. In rST this means
"interpreted text", which can be handled as a bunch of different
things if tagged with a specific "role":
https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#interpreted-text
The default "role" if none is specified is "title_reference", intended for
references to book or article titles, and it renders into the HTML
as <cite>...</cite> (usually comes out as italics).

If you want fixed-width-font text, that's double backtick: ``text``.
If you want italics, that's *emphasised text*.
If you want bold, that's **strong text**.

> +defined to mirror the Linux kernel parameter file
> +`/proc/sys/abi/sve_default_vector_length`.  The default length, `N`,
> +is in units of bytes and must be between 16 and 8192.
> +If not specified, the default vector length is 64.
> +
> +If the default length is larger than the maximum vector length enabled
> +with `sve<N>` properties, the actual vector length will be reduced.

We should document the -1 case too, something like:

If this property is set to ``-1`` then the default vector length
is set to the maximum possible length.

Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


  reply	other threads:[~2021-07-26 11:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 20:33 [PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property Richard Henderson
2021-07-23 20:33 ` [PATCH v2 1/3] target/arm: Correctly bound length in sve_zcr_get_valid_len Richard Henderson
2021-07-26 10:57   ` Peter Maydell
2021-07-23 20:33 ` [PATCH v2 2/3] target/arm: Export aarch64_sve_zcr_get_valid_len Richard Henderson
2021-07-26 10:57   ` Peter Maydell
2021-07-23 20:33 ` [PATCH v2 3/3] target/arm: Add sve-default-vector-length cpu property Richard Henderson
2021-07-26 11:07   ` Peter Maydell [this message]
2021-07-26 14:59   ` Andrew Jones
2021-07-26 18:33     ` Richard Henderson
2021-07-26 18:40       ` Andrew Jones
2021-07-26 19:31       ` Peter Maydell
2021-07-26 12:42 ` [PATCH v2 0/3] " Peter Maydell
2021-07-26 15:00   ` Andrew Jones
2021-07-26 15:41     ` Peter Maydell

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='CAFEAcA_0_cGcSDFVk+WqUS9Koi9hsQjRs7=7O1jiqQwv5fO2+w@mail.gmail.com' \
    --to=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.