]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Fix AArch64 guest userspace exception injection
authorMarc Zyngier <marc.zyngier@arm.com>
Wed, 6 Jan 2016 18:29:19 +0000 (18:29 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Sun, 24 Jan 2016 21:55:57 +0000 (21:55 +0000)
commit753deec734f69b2a5a884d102d7b8d611b809a7e
treeeae24b891572c95e695b3cfe397e5df575e0b7bf
parent5367e65a538f2d59834d845f582bc1f1ae9599b8
arm64: KVM: Fix AArch64 guest userspace exception injection

At the moment, our fault injection is pretty limited. We always
generate a SYNC exception into EL1, as if the fault was actually
from EL1h, no matter how it was generated.

This is obviously wrong, as EL0 can generate faults of its own
(not to mention the pretty-much unused EL1t mode).

This patch fixes it by implementing section D1.10.2 of the ARMv8 ARM,
and in particular table D1-7 ("Vector offsets from vector table base
address"), which describes which vector to use depending on the source
exception level and type (synchronous, IRQ, FIQ or SError).

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Tested-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/kvm/inject_fault.c