KVM: arm64: Let errors from SMCCC emulation to reach userspace
authorOliver Upton <oliver.upton@linux.dev>
Tue, 4 Apr 2023 15:40:48 +0000 (15:40 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 5 Apr 2023 11:07:42 +0000 (12:07 +0100)
commit37c8e494794786aa8e4acba1f0f5b45f37b11699
tree4e5a129401d33f6eeaf354faf839bcf176a3f62e
parent7e484d2785e2a2e526a6b2679d3e4c1402ffe0ec
KVM: arm64: Let errors from SMCCC emulation to reach userspace

Typically a negative return from an exit handler is used to request a
return to userspace with the specified error. KVM's handling of SMCCC
emulation (i.e. both HVCs and SMCs) deviates from the trend and resumes
the guest instead.

Stop handling negative returns this way and instead let the error
percolate to userspace.

Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230404154050.2270077-12-oliver.upton@linux.dev
arch/arm64/kvm/handle_exit.c