From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>,
Sergey Fedorov <serge.fdrv@gmail.com>,
qemu-arm@nongnu.org, patches@linaro.org
Subject: [Qemu-devel] [PATCH v2 0/4] target-arm: Clean up trap/undef handling of SRS
Date: Fri, 12 Feb 2016 15:31:51 +0000 [thread overview]
Message-ID: <1455291115-30305-1-git-send-email-peter.maydell@linaro.org> (raw)
The SRS instruction is a bit of an oddity because it isn't
used by Linux these days. Nonetheless it has a bunch of
UNPREDICTABLE, UNDEF and trapping behaviour that we weren't
correctly implementing:
- trap to EL3 if EL3 is AArch64 and we are at Secure EL1
- UNDEFINED in Hyp mode
- UNPREDICTABLE in User or System mode
- UNPREDICTABLE if the specified mode is:
-- not implemented
-- not a valid mode number
-- a mode that's at a higher exception level
-- Monitor, if we are Non-secure
This series implements the checks we were missing and makes
us UNDEF for all the UNPREDICTABLE cases.
Patch 1 does the easy checks that can be done at translate time;
patches 2 and 3 are code motion in preparation for patch 4, which
puts in a run-time check for the one awkward case we don't have
enough information to UNDEF at translate time.
Changes v1->v2: drop the user-mode-only assertions from the
get_/set_r13_banked() functions as suggested in review.
These have all now been reviewed so I'm just sending them out
to the list for completeness -- I'll put the patches in
target-arm.next in a moment.
thanks
-- PMM
Peter Maydell (4):
target-arm: Clean up trap/undef handling of SRS
target-arm: Move get/set_r13_banked() to op_helper.c
target-arm: Combine user-only and softmmu get/set_r13_banked()
target-arm: UNDEF in the UNPREDICTABLE SRS-from-System case
target-arm/helper.c | 33 -------------------------
target-arm/op_helper.c | 26 ++++++++++++++++++++
target-arm/translate.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++----
3 files changed, 88 insertions(+), 38 deletions(-)
--
1.9.1
next reply other threads:[~2016-02-12 15:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 15:31 Peter Maydell [this message]
2016-02-12 15:31 ` [Qemu-devel] [PATCH v2 1/4] target-arm: Clean up trap/undef handling of SRS Peter Maydell
2016-02-12 15:31 ` [Qemu-devel] [PATCH v2 2/4] target-arm: Move get/set_r13_banked() to op_helper.c Peter Maydell
2016-02-12 15:31 ` [Qemu-devel] [PATCH v2 3/4] target-arm: Combine user-only and softmmu get/set_r13_banked() Peter Maydell
2016-02-12 15:31 ` [Qemu-devel] [PATCH v2 4/4] target-arm: UNDEF in the UNPREDICTABLE SRS-from-System case 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=1455291115-30305-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=edgar.iglesias@xilinx.com \
--cc=patches@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=serge.fdrv@gmail.com \
/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).