qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/71] linux-user/aarch64: Introduce sve_vq_cached


From: Peter Maydell
Subject: Re: [PATCH 02/71] linux-user/aarch64: Introduce sve_vq_cached
Date: Mon, 6 Jun 2022 11:31:08 +0100

On Thu, 2 Jun 2022 at 22:49, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Add an interface function to extract the digested vector length
> rather than the raw zcr_el[1] value.  This fixes an incorrect
> return from do_prctl_set_vl where we didn't take into account
> the set of vector lengths supported by the cpu.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> v2: Add sve_vq_cached rather than directly access hflags.
> ---
>  linux-user/aarch64/target_prctl.h | 20 +++++++++++++-------
>  target/arm/cpu.h                  | 11 +++++++++++
>  linux-user/aarch64/signal.c       |  4 ++--
>  3 files changed, 26 insertions(+), 9 deletions(-)


> +/**
> + * sve_vq_cached
> + * @env: the cpu context
> + *
> + * Return the VL cached within env->hflags, in units of quadwords.
> + */

I think the fact that the VQ is cached is an implementation
detail -- we could in theory calculate it here from
zcr_el[] if we wanted. So I think we should name the function
just sve_vq().

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

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]