[PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property

Richard Henderson posted 3 patches 2 years, 9 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210723203344.968563-1-richard.henderson@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>
docs/system/arm/cpu-features.rst | 11 ++++++
target/arm/cpu.h                 |  5 +++
target/arm/internals.h           | 10 ++++++
target/arm/cpu.c                 | 14 ++++++--
target/arm/cpu64.c               | 60 ++++++++++++++++++++++++++++++++
target/arm/helper.c              |  8 +++--
6 files changed, 103 insertions(+), 5 deletions(-)
[PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property
Posted by Richard Henderson 2 years, 9 months ago
This is intended to resolve #482.

Changes for v2:
  * Split out length bounding fix to new patch.
  * Use byte units for sve-default-vector-length.
  * Support undocumented -1 "maximum".
  * Add documentation.


r~


Richard Henderson (3):
  target/arm: Correctly bound length in sve_zcr_get_valid_len
  target/arm: Export aarch64_sve_zcr_get_valid_len
  target/arm: Add sve-default-vector-length cpu property

 docs/system/arm/cpu-features.rst | 11 ++++++
 target/arm/cpu.h                 |  5 +++
 target/arm/internals.h           | 10 ++++++
 target/arm/cpu.c                 | 14 ++++++--
 target/arm/cpu64.c               | 60 ++++++++++++++++++++++++++++++++
 target/arm/helper.c              |  8 +++--
 6 files changed, 103 insertions(+), 5 deletions(-)

-- 
2.25.1


Re: [PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property
Posted by Peter Maydell 2 years, 9 months ago
On Fri, 23 Jul 2021 at 21:34, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> This is intended to resolve #482.
>
> Changes for v2:
>   * Split out length bounding fix to new patch.
>   * Use byte units for sve-default-vector-length.
>   * Support undocumented -1 "maximum".
>   * Add documentation.

I'm going to apply this to target-arm.next with the following
docs tweak squashed into patch 3:

diff --git a/docs/system/arm/cpu-features.rst b/docs/system/arm/cpu-features.rst
index 4ff36cc83f0..7b97df442aa 100644
--- a/docs/system/arm/cpu-features.rst
+++ b/docs/system/arm/cpu-features.rst
@@ -379,11 +379,14 @@ 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
+For qemu-aarch64, the cpu property ``sve-default-vector-length=N`` is
 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.
+``/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.
+with ``sve<N>`` properties, the actual vector length will be reduced.
+
+If this property is set to ``-1`` then the default vector length
+is set to the maximum possible length.

thanks
-- PMM

Re: [PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property
Posted by Andrew Jones 2 years, 9 months ago
On Mon, Jul 26, 2021 at 01:42:45PM +0100, Peter Maydell wrote:
> On Fri, 23 Jul 2021 at 21:34, Richard Henderson
> <richard.henderson@linaro.org> wrote:
> >
> > This is intended to resolve #482.
> >
> > Changes for v2:
> >   * Split out length bounding fix to new patch.
> >   * Use byte units for sve-default-vector-length.
> >   * Support undocumented -1 "maximum".
> >   * Add documentation.
> 
> I'm going to apply this to target-arm.next with the following
> docs tweak squashed into patch 3:
> 
> diff --git a/docs/system/arm/cpu-features.rst b/docs/system/arm/cpu-features.rst
> index 4ff36cc83f0..7b97df442aa 100644
> --- a/docs/system/arm/cpu-features.rst
> +++ b/docs/system/arm/cpu-features.rst
> @@ -379,11 +379,14 @@ 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
> +For qemu-aarch64, the cpu property ``sve-default-vector-length=N`` is
>  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.
> +``/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.
> +with ``sve<N>`` properties, the actual vector length will be reduced.
> +
> +If this property is set to ``-1`` then the default vector length
> +is set to the maximum possible length.

This file is full of single backtick usage. Isn't it better to stay
consistent? Or do we need a patch that converts all the rest now?

Thanks,
drew

> 
> thanks
> -- PMM
> 


Re: [PATCH v2 0/3] target/arm: Add sve-default-vector-length cpu property
Posted by Peter Maydell 2 years, 9 months ago
On Mon, 26 Jul 2021 at 16:01, Andrew Jones <drjones@redhat.com> wrote:
>
> On Mon, Jul 26, 2021 at 01:42:45PM +0100, Peter Maydell wrote:
> > On Fri, 23 Jul 2021 at 21:34, Richard Henderson
> > <richard.henderson@linaro.org> wrote:
> > >
> > > This is intended to resolve #482.
> > >
> > > Changes for v2:
> > >   * Split out length bounding fix to new patch.
> > >   * Use byte units for sve-default-vector-length.
> > >   * Support undocumented -1 "maximum".
> > >   * Add documentation.
> >
> > I'm going to apply this to target-arm.next with the following
> > docs tweak squashed into patch 3:
> >
> > diff --git a/docs/system/arm/cpu-features.rst b/docs/system/arm/cpu-features.rst
> > index 4ff36cc83f0..7b97df442aa 100644
> > --- a/docs/system/arm/cpu-features.rst
> > +++ b/docs/system/arm/cpu-features.rst
> > @@ -379,11 +379,14 @@ 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
> > +For qemu-aarch64, the cpu property ``sve-default-vector-length=N`` is
> >  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.
> > +``/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.
> > +with ``sve<N>`` properties, the actual vector length will be reduced.
> > +
> > +If this property is set to ``-1`` then the default vector length
> > +is set to the maximum possible length.
>
> This file is full of single backtick usage. Isn't it better to stay
> consistent? Or do we need a patch that converts all the rest now?

I just sent one of those:
https://patchew.org/QEMU/20210726142338.31872-1-peter.maydell@linaro.org/

-- PMM