qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] target/arm: Implement tailchaining for M profile cores
@ 2018-07-20 14:56 Peter Maydell
  2018-07-20 14:56 ` [Qemu-devel] [PATCH 1/4] target/arm: Improve exception-taken logging Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Peter Maydell @ 2018-07-20 14:56 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: patches

Tailchaining is an optimization in handling of exception return
for M-profile cores: if we are about to pop the exception stack
for an exception return, but there is a pending exception which
is higher priority than the priority we are returning to, then
instead of unstacking and then immediately taking the exception
and stacking registers again, we can chain to the pending
exception without unstacking and stacking.

For v6M and v7M it is IMPDEF whether tailchaining happens for pending
exceptions; for v8M this is architecturally required.  Implement it
in QEMU for all M-profile cores, since in practice v6M and v7M
hardware implementations generally do have it.

(We were already doing tailchaining for derived exceptions which
happened during exception return, like the validity checks and
stack access failures; these have always been required to be
tailchained for all versions of the architecture.)

The first few patches here do some minor cleanup and bug fixing
that I noticed while working on this; patch 4 is the actual
implementation, which turns out to be pretty trivial.

thanks
-- PMM

Peter Maydell (4):
  target/arm: Improve exception-taken logging
  target/arm: Initialize exc_secure correctly in do_v7m_exception_exit()
  target/arm: Restore M-profile CONTROL.SPSEL before any tailchaining
  target/arm: Implement tailchaining for M profile cores

 target/arm/helper.c | 47 ++++++++++++++++++++++++++++++++++-----------
 1 file changed, 36 insertions(+), 11 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-07-21 19:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-20 14:56 [Qemu-devel] [PATCH 0/4] target/arm: Implement tailchaining for M profile cores Peter Maydell
2018-07-20 14:56 ` [Qemu-devel] [PATCH 1/4] target/arm: Improve exception-taken logging Peter Maydell
2018-07-20 16:15   ` Richard Henderson
2018-07-21 19:47   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-07-20 14:56 ` [Qemu-devel] [PATCH 2/4] target/arm: Initialize exc_secure correctly in do_v7m_exception_exit() Peter Maydell
2018-07-20 16:17   ` Richard Henderson
2018-07-21 19:48   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-07-20 14:56 ` [Qemu-devel] [PATCH 3/4] target/arm: Restore M-profile CONTROL.SPSEL before any tailchaining Peter Maydell
2018-07-20 16:19   ` Richard Henderson
2018-07-20 14:56 ` [Qemu-devel] [PATCH 4/4] target/arm: Implement tailchaining for M profile cores Peter Maydell
2018-07-20 16:22   ` Richard Henderson

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).