arm64: handle async aborts delivered while at EL2
authorWei Chen <Wei.Chen@arm.com>
Tue, 29 Nov 2016 14:58:57 +0000 (15:58 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Nov 2016 14:58:57 +0000 (15:58 +0100)
commit36008800e81bc061cce1fd204a0b638f9dc61c70
tree31d6e91abe1d349befbcf2122414e379651f9803
parent2cf7d2bafb9b68add1710b8c3f7ecad58e53a9db
arm64: handle async aborts delivered while at EL2

If EL1 generates an asynchronous abort and then traps into EL2
(by HVC or IRQ) before the abort has been delivered, the hypervisor
could not catch it, because the PSTATE.A bit is masked all the time
in hypervisor. So this asynchronous abort may be slipped to next
running guest with PSTATE.A bit unmasked.

In order to avoid this, it is necessary to take the abort at EL2, by
clearing the PSTATE.A bit. In this patch, we unmask the PSTATE.A bit
to open a window to catch guest-generated asynchronous abort in all
EL1 -> EL2 swich paths. If we catched such asynchronous abort in
checking window, the hyp_error exception will be triggered and the
abort source guest will be crashed.

This is part of XSA-201.

Signed-off-by: Wei Chen <Wei.Chen@arm.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm64/entry.S