The privilege specs say (p22)
When a trap is taken from privilege mode y into privilege mode x, x
PIE is set to the value of y IE; x IE is set to 0; and x PP is set to y.
and then p28
By default, all traps at any privilege level are handled in machine
mode, though a machine-mode handler can redirect traps back to the
appropriate level with the MRET instruction (Section 3.2.1).
To increase performance, implementations can provide individual
read/write bits within medeleg
and mideleg to indicate that certain exceptions and interrupts
should be processed directly by a
lower privilege level.
I understand the phrase "when a trap is taken from privilege mode y into
privilege mode x",
to mean automatically, not using any MRET instruction. So if x is not
the M-mode,
it means there exists at least one delegation bit for that trap.
In other words a trap from y mode is taken into x mode if and only if
the corresponding bits
in the cascading delegation registers between M-mode and x mode are true
It is a necessary and sufficient condition.
Am I right ?
--
Best Regards,
Vania Joloboff
INRIA Bretagne Atlantique
Campus de Beaulieu
35042 Rennes Cedex
Tél:
+33 (0)2 9984 7100
Fax:
+33 (0)2 9984 7171