arm64: KVM: Increment PC after handling an SMC trap
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 6 Feb 2018 17:56:07 +0000 (17:56 +0000)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:28 +0000 (18:46 +0800)
commitfcfb24204150e6b11841784b692a8bf43ed1c0a9
treead8c2c5238763cb565b23b484ae0342ad464fd2d
parent353afc7b422d1d4fecce167678a03f34fdde5df6
arm64: KVM: Increment PC after handling an SMC trap

commit f5115e8869e1 upstream.

When handling an SMC trap, the "preferred return address" is set
to that of the SMC, and not the next PC (which is a departure from
the behaviour of an SMC that isn't trapped).

Increment PC in the handler, as the guest is otherwise forever
stuck...

Cc: stable@vger.kernel.org
Fixes: acfb3b883f6d ("arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls")
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
arch/arm64/kvm/handle_exit.c