arm64: KVM: Fix host crash when injecting a fault into a 32bit guest
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 27 Aug 2015 15:10:01 +0000 (16:10 +0100)
committerJiri Slaby <jslaby@suse.cz>
Fri, 18 Sep 2015 07:26:33 +0000 (09:26 +0200)
commita246a015d49f0a6133c255cd9ce688f3342b51ae
tree2a9e02819fdcc3c720294e0efa5c7f98ea6d8f3d
parenta06d0b11bb14e60f08b4d6aa21a0b3101b07b8b6
arm64: KVM: Fix host crash when injecting a fault into a 32bit guest

commit 126c69a0bd0e441bf6766a5d9bf20de011be9f68 upstream.

When injecting a fault into a misbehaving 32bit guest, it seems
rather idiotic to also inject a 64bit fault that is only going
to corrupt the guest state. This leads to a situation where we
perform an illegal exception return at EL2 causing the host
to crash instead of killing the guest.

Just fix the stupid bug that has been there from day 1.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/arm64/kvm/inject_fault.c