Skip to content

KVM: arm/arm64: Fix guest's PMR synchronization when blocking on WFI

Marc Zyngier kvm kvmarm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to blockinclude/kvm/arm_vgic.h virt/kvm/arm/arm.c virt/kvm/arm/vgic/vgic-v2.c +3 more+39 -20 replies
2/2KVM: Call kvm_arch_vcpu_blocking early into the blocking sequencevirt/kvm/kvm_main.c+3 -42 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchPaolo Bonzini
1/2
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] KVM: arm/arm64: Fix guest's PMR synchronization when blocking on WFI

It recently came to light that if we run a guest that actively uses interrupt priorities to block interrupts, vcpus can end-up being blocked while they shouldn't, leading to an unresponsive guest (a slightly less than desirable outcome).

Patch #1 fixes the issue (which has been with us since 4.12), which I plan to take in for 5.3 with immediate backport to stable.

Patch #2 is more of an RFC, as it also impacts the SVN AVIC support. It moves the kvm_arch_vcpu_blocking callback to happen earlier, leading to much better performances on ARM, and leading to the above fix to be applied at the best possible spot. I'd welcome any comment/testing on this, specially on non-ARM systems.

Marc Zyngier (2):
KVM: arm/arm64: Sync ICH_VMCR_EL2 back when about to block
KVM: Call kvm_arch_vcpu_blocking early into the blocking sequence

 include/kvm/arm_vgic.h      |  1 +
 virt/kvm/arm/arm.c          | 11 +++++++++++
 virt/kvm/arm/vgic/vgic-v2.c |  9 ++++++++-
 virt/kvm/arm/vgic/vgic-v3.c |  7 ++++++-
 virt/kvm/arm/vgic/vgic.c    | 11 +++++++++++
 virt/kvm/arm/vgic/vgic.h    |  2 ++
 virt/kvm/kvm_main.c         |  7 +++----
 7 files changed, 42 insertions(+), 6 deletions(-)
Signature · 1 line
2.20.1