aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/lib
diff options
context:
space:
mode:
authorOliver Upton <oupton@google.com>2022-02-17 10:12:42 +0000
committerMarc Zyngier <maz@kernel.org>2022-02-17 14:36:50 +0000
commita867e9d0cc15039a6ef72e17e2603303dcd1783f (patch)
tree50cdb3f82c06bc8deff14eeb561558873ebaca80 /tools/testing/selftests/kvm/lib
parentKVM: arm64: vgic: Read HW interrupt pending state from the HW (diff)
downloadlinux-dev-a867e9d0cc15039a6ef72e17e2603303dcd1783f.tar.xz
linux-dev-a867e9d0cc15039a6ef72e17e2603303dcd1783f.zip
KVM: arm64: Don't miss pending interrupts for suspended vCPU
In order to properly emulate the WFI instruction, KVM reads back ICH_VMCR_EL2 and enables doorbells for GICv4. These preparations are necessary in order to recognize pending interrupts in kvm_arch_vcpu_runnable() and return to the guest. Until recently, this work was done by kvm_arch_vcpu_{blocking,unblocking}(). Since commit 6109c5a6ab7f ("KVM: arm64: Move vGIC v4 handling for WFI out arch callback hook"), these callbacks were gutted and superseded by kvm_vcpu_wfi(). It is important to note that KVM implements PSCI CPU_SUSPEND calls as a WFI within the guest. However, the implementation calls directly into kvm_vcpu_halt(), which skips the needed work done in kvm_vcpu_wfi() to detect pending interrupts. Fix the issue by calling the WFI helper. Fixes: 6109c5a6ab7f ("KVM: arm64: Move vGIC v4 handling for WFI out arch callback hook") Signed-off-by: Oliver Upton <oupton@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220217101242.3013716-1-oupton@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/lib')
0 files changed, 0 insertions, 0 deletions