diff options
author | James Morse <james.morse@arm.com> | 2020-01-21 15:33:55 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-15 00:34:17 +0300 |
commit | 9cce31930ad32bd064d938a903305c57d529976a (patch) | |
tree | b28e5dd9750635c516565b7081a4562dd95c88c8 /drivers/gpio/gpio-siox.c | |
parent | 48f9ec2020b31abf92544b01d2719a2b18b5df7e (diff) | |
download | linux-9cce31930ad32bd064d938a903305c57d529976a.tar.xz |
KVM: arm: Fix DFSR setting for non-LPAE aarch32 guests
commit 018f22f95e8a6c3e27188b7317ef2c70a34cb2cd upstream.
Beata reports that KVM_SET_VCPU_EVENTS doesn't inject the expected
exception to a non-LPAE aarch32 guest.
The host intends to inject DFSR.FS=0x14 "IMPLEMENTATION DEFINED fault
(Lockdown fault)", but the guest receives DFSR.FS=0x04 "Fault on
instruction cache maintenance". This fault is hooked by
do_translation_fault() since ARMv6, which goes on to silently 'handle'
the exception, and restart the faulting instruction.
It turns out, when TTBCR.EAE is clear DFSR is split, and FS[4] has
to shuffle up to DFSR[10].
As KVM only does this in one place, fix up the static values. We
now get the expected:
| Unhandled fault: lock abort (0x404) at 0x9c800f00
Fixes: 74a64a981662a ("KVM: arm/arm64: Unify 32bit fault injection")
Reported-by: Beata Michalska <beata.michalska@linaro.org>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200121123356.203000-2-james.morse@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio/gpio-siox.c')
0 files changed, 0 insertions, 0 deletions