All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-arm] [PATCH 0/4] target-arm: Clean up trap/undef handling of SRS
@ 2016-02-11 19:11 ` Peter Maydell
  0 siblings, 0 replies; 34+ messages in thread
From: Peter Maydell @ 2016-02-11 19:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-arm, patches

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.

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 | 32 ++++++++++++++++++++++++
 target-arm/translate.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++----
 3 files changed, 94 insertions(+), 38 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2016-02-12 15:49 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11 19:11 [Qemu-arm] [PATCH 0/4] target-arm: Clean up trap/undef handling of SRS Peter Maydell
2016-02-11 19:11 ` [Qemu-devel] " Peter Maydell
2016-02-11 19:11 ` [Qemu-arm] [PATCH 1/4] " Peter Maydell
2016-02-11 19:11   ` [Qemu-devel] " Peter Maydell
2016-02-12  8:48   ` [Qemu-arm] " Sergey Fedorov
2016-02-12  8:48     ` [Qemu-devel] " Sergey Fedorov
2016-02-12 14:56   ` Edgar E. Iglesias
2016-02-11 19:11 ` [Qemu-arm] [PATCH 2/4] target-arm: Move get/set_r13_banked() to op_helper.c Peter Maydell
2016-02-11 19:11   ` [Qemu-devel] " Peter Maydell
2016-02-12  8:56   ` [Qemu-arm] " Sergey Fedorov
2016-02-12  8:56     ` [Qemu-devel] " Sergey Fedorov
2016-02-12 15:05   ` [Qemu-arm] " Edgar E. Iglesias
2016-02-12 15:05     ` [Qemu-devel] " Edgar E. Iglesias
2016-02-11 19:11 ` [Qemu-arm] [PATCH 3/4] target-arm: Combine user-only and softmmu get/set_r13_banked() Peter Maydell
2016-02-11 19:11   ` [Qemu-devel] " Peter Maydell
2016-02-12  8:58   ` [Qemu-arm] " Sergey Fedorov
2016-02-12  8:58     ` [Qemu-devel] " Sergey Fedorov
2016-02-12 15:12   ` [Qemu-arm] " Edgar E. Iglesias
2016-02-12 15:12     ` [Qemu-devel] " Edgar E. Iglesias
2016-02-12 15:15     ` [Qemu-arm] " Peter Maydell
2016-02-12 15:15       ` [Qemu-devel] " Peter Maydell
2016-02-12 15:16       ` Edgar E. Iglesias
2016-02-12 15:48         ` [Qemu-arm] " Sergey Fedorov
2016-02-12 15:48           ` [Qemu-devel] " Sergey Fedorov
2016-02-12 15:49         ` [Qemu-arm] " Peter Maydell
2016-02-12 15:49           ` [Qemu-devel] " Peter Maydell
2016-02-12 15:15     ` [Qemu-arm] " Edgar E. Iglesias
2016-02-12 15:15       ` [Qemu-devel] " Edgar E. Iglesias
2016-02-11 19:11 ` [Qemu-arm] [PATCH 4/4] target-arm: UNDEF in the UNPREDICTABLE SRS-from-System case Peter Maydell
2016-02-11 19:11   ` [Qemu-devel] " Peter Maydell
2016-02-12  9:34   ` [Qemu-arm] " Sergey Fedorov
2016-02-12  9:34     ` [Qemu-devel] " Sergey Fedorov
2016-02-12 15:17   ` [Qemu-arm] " Edgar E. Iglesias
2016-02-12 15:17     ` [Qemu-devel] " Edgar E. Iglesias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.