]> 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)
commita61f10f1053b519dc1431d9bf26e3f9871d5b40d
treebf480c94df6fdf86f424058b07fadf442b851ad1
parentbcf9d42dcf2a0cf7ba2469295425f93baa1b5601
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