KVM: arm64: Handle blocking WFIT instruction
authorMarc Zyngier <maz@kernel.org>
Tue, 19 Apr 2022 18:27:50 +0000 (19:27 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 20 Apr 2022 12:24:45 +0000 (13:24 +0100)
commit89f5074c503b6b6f181c0240c931f67bcaf266e9
treecd4f418e74bc656f9277c17507e245e561bb24a2
parentdaf85a5f6be33788e18ff3efad1d7c3ad66a8cb3
KVM: arm64: Handle blocking WFIT instruction

When trapping a blocking WFIT instruction, take it into account when
computing the deadline of the background timer.

The state is tracked with a new vcpu flag, and is gated by a new
CPU capability, which isn't currently enabled.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220419182755.601427-6-maz@kernel.org
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arch_timer.c
arch/arm64/kvm/arm.c
arch/arm64/kvm/handle_exit.c