qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Laurent Desnogues <laurent.desnogues@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] AArch64: ZCR and ARM_CP_SVE/ARM_CP_FPU flags
Date: Fri, 25 May 2018 07:07:48 -0700	[thread overview]
Message-ID: <666d7574-6d61-e490-08a5-702ea3d65fb3@linaro.org> (raw)
In-Reply-To: <CABoDooMwdGR7fJKc=b9zjFGgxPniXyZ8vevKg7fjuWEDioTB9Q@mail.gmail.com>

On 05/22/2018 11:49 PM, Laurent Desnogues wrote:
> ZCR system registers are both flagged as ARM_CP_SVE and ARM_CP_FPU,
> which results in an assertion failure in fp_access_check due to the
> check of these flags in handle_sys:
> 
>     if ((ri->type & ARM_CP_SVE) && !sve_access_check(s)) {
>         return;
>     }
>     if ((ri->type & ARM_CP_FPU) && !fp_access_check(s)) {
>         return;
>     }
> 
> sve_access_check calls fp_access_check so the assert
> !s->fp_access_checked in the second call to fp_access_check will fail.

Hah.  Yes, these checks have migrated a bit since I first wrote them, and I
have (perhaps obviously) done zero system-level testing so far.

> I took a quick look at sve_exception_el and given that it checks that
> FPU is enabled, can't we just remove the ARM_CP_FPU flag from ZCR?
> 
> Alternatively the second call to fp_access_check when ARM_CP_FPU is
> defined could be skipped if ARM_CP_SVE is set.

I would say the first -- removing FPU -- but will defer to Peter.


r~

      reply	other threads:[~2018-05-25 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23  6:49 [Qemu-devel] AArch64: ZCR and ARM_CP_SVE/ARM_CP_FPU flags Laurent Desnogues
2018-05-25 14:07 ` Richard Henderson [this message]

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=666d7574-6d61-e490-08a5-702ea3d65fb3@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=laurent.desnogues@gmail.com \
    --cc=peter.maydell@linaro.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).