Skip to content

KVM: arm64: Fixup PC updates on exit to userspace

Marc Zyngier kvm kvmarm linux-arm-kernel stable 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 4 repliesIn review
  2. v12 patches 11 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: Move __adjust_pc out of linearch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/exception.c arch/arm64/kvm/hyp/include/hyp/adjust_pc.h +2 more+21 -231 reply
2/2KVM: arm64: Commit pending PC adjustemnts before returning to userspacearch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/exception.c +1 more+21 -22 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchZenghui YuAlexandru Elisei
SeriesR-b T-b
1/2R-b
2/2R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/2] KVM: arm64: Fixup PC updates on exit to userspace

We recently moved anything related to PC updates into the guest entry code to help with the protected KVM effort. However, I missed a critical point: userspace needs to be able to observe state changes when the vcpu exits. Otherwise, live migration is a bit broken and vcpu reset can fail (as reported by Zenghui). Not good.

These two patches aim at fixing the above, and carry a Cc stable.

* From v1:
- Sanitized flag checking
- Added comment about relying on __kvm_adjust_pc() being preempt-safe
- Dropped superfluous includes

Marc Zyngier (2):
KVM: arm64: Move __adjust_pc out of line
KVM: arm64: Commit pending PC adjustemnts before returning to
userspace

 arch/arm64/include/asm/kvm_asm.h           |  3 +++
 arch/arm64/kvm/arm.c                       | 10 ++++++++++
 arch/arm64/kvm/hyp/exception.c             | 18 +++++++++++++++++-
 arch/arm64/kvm/hyp/include/hyp/adjust_pc.h | 18 ------------------
 arch/arm64/kvm/hyp/nvhe/hyp-main.c         |  8 ++++++++
 arch/arm64/kvm/hyp/nvhe/switch.c           |  3 +--
 arch/arm64/kvm/hyp/vhe/switch.c            |  3 +--
 7 files changed, 40 insertions(+), 23 deletions(-)
Signature · 1 line
2.29.2