qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH 0/7] target/arm: Fix FPCXT_NS accesses when FPU disabled
Date: Fri, 18 Jun 2021 15:10:12 +0100	[thread overview]
Message-ID: <20210618141019.10671-1-peter.maydell@linaro.org> (raw)

This patchseries fixes some bugs in v8.1M M-profile sysreg accesses:

 (1) When the FPU is disabled and there is no active FP context
     (as defined by the pseudocode fpInactive flag), accesses to
     FPCXT_NS should not fail with a NOCP exception
 (2) For cases where VLDR/VSTR sysreg don't perform a memory access
     (VLDR/VSTR of VPR when unprivileged, and VLDR to FPCXT_NS
     when fpInactive), the "side effects" of the load (update of
     writeback base register, and stack limit check) still need
     to happen, but we were skipping them

This patchseries fixes those bugs. Since these were detected by
running tests from the gcc testsuite, I've marked the first four
patches as cc: stable. The last three are a refactoring which
isn't part of the bugfix proper.

Note for backport to stable: the patchset has a semantic dependency
on commit 9a486856e9173af, which was not marked as cc-stable because
we didn't know we'd need it for a for-stable bugfix. So that needs
to be taken as well if this series goes to stable.

thanks
-- PMM

Peter Maydell (7):
  target/arm/translate-vfp.c: Whitespace fixes
  target/arm: Handle FPU being disabled in FPCXT_NS accesses
  target/arm: Don't NOCP fault for FPCXT_NS accesses
  target/arm: Handle writeback in VLDR/VSTR sysreg with no memory access
  target/arm: Factor FP context update code out into helper function
  target/arm: Split vfp_access_check() into A and M versions
  target/arm: Handle FPU check for FPCXT_NS insns via
    vfp_access_check_m()

 target/arm/translate-a32.h    |   1 +
 target/arm/m-nocp.decode      |  24 ++
 target/arm/vfp.decode         |  14 -
 target/arm/translate-m-nocp.c | 550 ++++++++++++++++++++++++++++
 target/arm/translate-vfp.c    | 664 ++++++----------------------------
 5 files changed, 681 insertions(+), 572 deletions(-)

-- 
2.20.1



             reply	other threads:[~2021-06-18 14:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 14:10 Peter Maydell [this message]
2021-06-18 14:10 ` [PATCH 1/7] target/arm/translate-vfp.c: Whitespace fixes Peter Maydell
2021-06-18 15:07   ` Richard Henderson
2021-06-18 14:10 ` [PATCH 2/7] target/arm: Handle FPU being disabled in FPCXT_NS accesses Peter Maydell
2021-06-18 15:10   ` Richard Henderson
2021-06-18 14:10 ` [PATCH 3/7] target/arm: Don't NOCP fault for " Peter Maydell
2021-06-18 15:29   ` Richard Henderson
2021-06-18 14:10 ` [PATCH 4/7] target/arm: Handle writeback in VLDR/VSTR sysreg with no memory access Peter Maydell
2021-06-18 16:15   ` Richard Henderson
2021-06-18 16:54     ` Peter Maydell
2021-06-18 14:10 ` [PATCH 5/7] target/arm: Factor FP context update code out into helper function Peter Maydell
2021-06-18 16:20   ` Richard Henderson
2021-06-18 14:10 ` [PATCH 6/7] target/arm: Split vfp_access_check() into A and M versions Peter Maydell
2021-06-18 16:23   ` Richard Henderson
2021-06-18 14:10 ` [PATCH 7/7] target/arm: Handle FPU check for FPCXT_NS insns via vfp_access_check_m() Peter Maydell
2021-06-18 16:25   ` 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=20210618141019.10671-1-peter.maydell@linaro.org \
    --to=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).