]> git.baikalelectronics.ru Git - kernel.git/commit
arm/arm64: KVM: Complete WFI/WFE instructions
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 26 Aug 2014 12:33:02 +0000 (14:33 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Fri, 29 Aug 2014 09:53:53 +0000 (11:53 +0200)
commita4c37707de28b5114c42e50f00bc13036bf0e1cb
treefbf9095f4a612ac8d58c3328fb4170297d5339a1
parentc9b455cae57d52638a51d56b798114f5d0c4ed79
arm/arm64: KVM: Complete WFI/WFE instructions

The architecture specifies that when the processor wakes up from a WFE
or WFI instruction, the instruction is considered complete, however we
currrently return to EL1 (or EL0) at the WFI/WFE instruction itself.

While most guests may not be affected by this because their local
exception handler performs an exception returning setting the event bit
or with an interrupt pending, some guests like UEFI will get wedged due
this little mishap.

Simply skip the instruction when we have completed the emulation.

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