]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Parametrize exception entry with a target EL
authorMarc Zyngier <maz@kernel.org>
Tue, 21 Apr 2020 17:32:02 +0000 (18:32 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 28 May 2020 12:16:55 +0000 (13:16 +0100)
commit8a9495596c941e4cef7030567256c0806a7989d3
treec3d9d33afecb36ab5f9ab94c50d66b1103fd3774
parentf0a97aabc5626d6ebf65e8cf67f54ef62734ad7a
KVM: arm64: Parametrize exception entry with a target EL

We currently assume that an exception is delivered to EL1, always.
Once we emulate EL2, this no longer will be the case. To prepare
for this, add a target_mode parameter.

While we're at it, merge the computing of the target PC and PSTATE in
a single function that updates both PC and CPSR after saving their
previous values in the corresponding ELR/SPSR. This ensures that they
are updated in the correct order (a pretty common source of bugs...).

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/ptrace.h
arch/arm64/kvm/inject_fault.c