qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org
Subject: Re: [PATCH v2 3/7] target/arm: Do not use aarch64_sve_zcr_get_valid_len in reset
Date: Thu, 19 May 2022 09:33:37 -0700	[thread overview]
Message-ID: <764b9678-f67b-3f9c-7f00-a30a35796eb0@linaro.org> (raw)
In-Reply-To: <CAFEAcA9SU0vXtzw76HkN4wrSgsMyBNwA_bHGa7x0u0rtNe4LQw@mail.gmail.com>

On 5/19/22 03:40, Peter Maydell wrote:
> Not all the code that looks at the sve vector length
> goes through sve_zcr_len_for_el(), though. In particular,
> this is setting up ZCR_EL1 for usermode, and all
> the code under linux-user/ that wants to know the vector
> length does it with "env->vfp.zcr_el[1] & 0xf".

Oops, yes.  Linux-user should be checking ZCR_LEN from env->hflags.

> Incidentally, do_prctl_set_vl() also sets zcr_el[1] and
> it doesn't call aarch64_sve_zcr_get_valid_len(). Should it,
> or is it doing an equivalent check anyway?

I think this got missed when we introduced the set of valid lengths -- it's still assuming 
all lengths less than maximum are valid.

I'll add a couple of cleanup patches for this.

r~



  reply	other threads:[~2022-05-19 16:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  5:48 [PATCH v2 0/7] target/arm: SME prep patches Richard Henderson
2022-05-17  5:48 ` [PATCH v2 1/7] target/arm: Enable FEAT_HCX for -cpu max Richard Henderson
2022-05-17  5:48 ` [PATCH v2 2/7] target/arm: Use FIELD definitions for CPACR, CPTR_ELx Richard Henderson
2022-05-17  5:48 ` [PATCH v2 3/7] target/arm: Do not use aarch64_sve_zcr_get_valid_len in reset Richard Henderson
2022-05-19 10:40   ` Peter Maydell
2022-05-19 16:33     ` Richard Henderson [this message]
2022-05-17  5:48 ` [PATCH v2 4/7] target/arm: Merge aarch64_sve_zcr_get_valid_len into caller Richard Henderson
2022-05-17  5:48 ` [PATCH v2 5/7] target/arm: Use uint32_t instead of bitmap for sve vq's Richard Henderson
2022-05-19 12:10   ` Peter Maydell
2022-05-17  5:48 ` [PATCH v2 6/7] target/arm: Remove fp checks from sve_exception_el Richard Henderson
2022-05-19 11:36   ` Peter Maydell
2022-05-19 15:01     ` Richard Henderson
2022-05-17  5:48 ` [PATCH v2 7/7] target/arm: Add el_is_in_host Richard Henderson
2022-05-19 11:39   ` Peter Maydell
2022-05-19 15:04     ` Richard Henderson
2022-05-19 12:11 ` [PATCH v2 0/7] target/arm: SME prep patches 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=764b9678-f67b-3f9c-7f00-a30a35796eb0@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.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).