]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 16 Jan 2018 10:23:47 +0000 (10:23 +0000)
committerChristoffer Dall <christoffer.dall@linaro.org>
Tue, 16 Jan 2018 16:58:51 +0000 (17:58 +0100)
commitb30afd52c6ab5b7b22754637b44a111fbe1970a8
treebf480c94df6fdf86f424058b07fadf442b851ad1
parent6608cadb074cd326f0865f3c65a904c738b70a7e
arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls

KVM doesn't follow the SMCCC when it comes to unimplemented calls,
and inject an UNDEF instead of returning an error. Since firmware
calls are now used for security mitigation, they are becoming more
common, and the undef is counter productive.

Instead, let's follow the SMCCC which states that -1 must be returned
to the caller when getting an unknown function number.

Cc: <stable@vger.kernel.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm64/kvm/handle_exit.c