Skip to content

KVM: arm/arm64: Fix VCPU power management problems

Christoffer Dall kvm kvmarm linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 32 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: arm/arm64: Reset the VCPU without preemption and vcpu state loadedarch/arm64/kvm/reset.c+24 -210 replies
2/5arm/arm64: KVM: Allow a VCPU to fully reset itselfarch/arm/include/asm/kvm_host.h arch/arm/kvm/reset.c arch/arm64/include/asm/kvm_host.h +3 more+95 -2013 replies
3/5KVM: arm/arm64: Require VCPU threads to turn them self offarch/arm/include/asm/kvm_host.h arch/arm64/include/asm/kvm_host.h virt/kvm/arm/arm.c +1 more+12 -113 replies
4/5KVM: arm/arm64: Implement PSCI ON_PENDING when turning on VCPUsarch/arm/include/asm/kvm_host.h arch/arm64/include/asm/kvm_host.h virt/kvm/arm/arm.c +1 more+45 -201 reply
5/5arm/arm64: KVM: Don't panic on failure to properly reset system registersarch/arm/kvm/coproc.c arch/arm64/kvm/sys_regs.c+4 -45 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchMarc ZyngierChristoffer DallAndrew Jones
1/5R-b
2/5R-b
3/5A-b
4/5A-b R-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/5] KVM: arm/arm64: Fix VCPU power management problems

This series fixes a number of issues:

- When powering on and resetting VCPUs, we can be preempted in the middle which can lead to guest system register corruption.

- We were missing support for PSCI ON_PENDING when multiple VCPUs try to turn on a target VCPU at the same time.

- Powering off a VCPU could race with powering on the same VCPU.

- We unnecesarily panic'ed if we found a non-initialized guest system register.

The main approach to fixing all these problems is by using VCPU requests.

See the individual patches for more details.

Christoffer Dall (3):
KVM: arm/arm64: Reset the VCPU without preemption and vcpu state
loaded
KVM: arm/arm64: Require VCPU threads to turn them self off
KVM: arm/arm64: Implement PSCI ON_PENDING when turning on VCPUs

Marc Zyngier (2):
arm/arm64: KVM: Allow a VCPU to fully reset itself arm/arm64: KVM: Don't panic on failure to properly reset system
registers

 arch/arm/include/asm/kvm_host.h   | 22 ++++++++++-
 arch/arm/kvm/coproc.c             |  4 +-
 arch/arm/kvm/reset.c              | 24 ++++++++++++
 arch/arm64/include/asm/kvm_host.h | 23 ++++++++++-
 arch/arm64/kvm/reset.c            | 50 +++++++++++++++++++++++-
 arch/arm64/kvm/sys_regs.c         |  4 +-
 virt/kvm/arm/arm.c                | 40 ++++++++++++++-----
 virt/kvm/arm/psci.c               | 64 +++++++++++++++----------------
 8 files changed, 177 insertions(+), 54 deletions(-)
Signature · 1 line
2.18.0