Skip to content

KVM: arm64: Fix AT instruction handling

Andre Przywara stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: arm64: Add kvm_extable for vaxorcism codearch/arm64/include/asm/kvm_asm.h arch/arm64/kernel/vmlinux.lds.S arch/arm64/kvm/hyp/entry.S +2 more+96 -250 replies
2/4KVM: arm64: Defer guest entry when an asynchronous exception is pendingarch/arm64/kvm/hyp/entry.S+10 -00 replies
3/4KVM: arm64: Survive synchronous exceptions caused by AT instructionsarch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/hyp-entry.S arch/arm64/kvm/hyp/switch.c+42 -60 replies
4/4KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exceptionarch/arm64/include/asm/kvm_arm.h+2 -10 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchMarc Zyngier
1/4R-b
2/4
3/4R-b
4/4R-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 stable v4.9 0/4] KVM: arm64: Fix AT instruction handling

In some architectural corner cases, AT instructions can generate an exception, which KVM is not really ready to handle properly. Teach the code to handle this situation gracefully.

This is a backport of the respective upstream patches to v4.9(.235). James prepared and tested these already, but we were lacking the upstream commit IDs so far.
I am sending this on his behalf, since he is off this week.

The original patches contained stable tags, but with a prerequisite patch in v5.3. Patch 2/4 is a backport of this one (removing ARMv8.2 RAS barriers, which are not supported in v4.9), patches 1/4 and 3/4 needed some massaging to apply and work on 4.9.

Cheers,
Andre.

James Morse (4):
KVM: arm64: Add kvm_extable for vaxorcism code
KVM: arm64: Defer guest entry when an asynchronous exception is pending
KVM: arm64: Survive synchronous exceptions caused by AT instructions
KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception

 arch/arm64/include/asm/kvm_arm.h |  3 +-
 arch/arm64/include/asm/kvm_asm.h | 43 ++++++++++++++++++++++
 arch/arm64/kernel/vmlinux.lds.S  |  8 ++++
 arch/arm64/kvm/hyp/entry.S       | 26 ++++++++++---
 arch/arm64/kvm/hyp/hyp-entry.S   | 63 +++++++++++++++++++++-----------
 arch/arm64/kvm/hyp/switch.c      | 39 ++++++++++++++++++--
 6 files changed, 150 insertions(+), 32 deletions(-)
Signature · 1 line
2.17.1