qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>,
	Peter Maydell <peter.maydell@linaro.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] AArch64: ZCR and ARM_CP_SVE/ARM_CP_FPU flags
Date: Wed, 23 May 2018 08:49:01 +0200	[thread overview]
Message-ID: <CABoDooMwdGR7fJKc=b9zjFGgxPniXyZ8vevKg7fjuWEDioTB9Q@mail.gmail.com> (raw)

Hi,

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.

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.

Thanks,

Laurent

             reply	other threads:[~2018-05-23  6:49 UTC|newest]

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

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='CABoDooMwdGR7fJKc=b9zjFGgxPniXyZ8vevKg7fjuWEDioTB9Q@mail.gmail.com' \
    --to=laurent.desnogues@gmail.com \
    --cc=peter.maydell@linaro.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 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).