mbox series

[v5.4,v2,0/3] KVM: arm64: Fix AT instruction handling

Message ID 20200901145040.111467-1-andre.przywara@arm.com
Headers show
Series KVM: arm64: Fix AT instruction handling | expand

Message

Andre Przywara Sept. 1, 2020, 2:50 p.m. UTC
Changes from v1:
- (Re-)adding Marc's review tags from upstream. Differences to the
  original patches are trivial for 2/3 and 3/3, and straight-forward
  for 1/3.
- Fix spelling of vaxorcism (hope my soul gets spared for the sacrilege)

----------
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 v5.4(.61).
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 last two of the patches were tagged Cc: stable already, but did
not apply cleanly, hence this specific backport.

Cheers,
Andre.

James Morse (3):
  KVM: arm64: Add kvm_extable for vaxorcism code
  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       | 15 +++++---
 arch/arm64/kvm/hyp/hyp-entry.S   | 65 ++++++++++++++++++++------------
 arch/arm64/kvm/hyp/switch.c      | 39 +++++++++++++++++--
 6 files changed, 138 insertions(+), 35 deletions(-)

Comments

Greg Kroah-Hartman Sept. 4, 2020, 11:31 a.m. UTC | #1
On Tue, Sep 01, 2020 at 03:50:37PM +0100, Andre Przywara wrote:
> Changes from v1:
> - (Re-)adding Marc's review tags from upstream. Differences to the
>   original patches are trivial for 2/3 and 3/3, and straight-forward
>   for 1/3.
> - Fix spelling of vaxorcism (hope my soul gets spared for the sacrilege)

Now queued up, thanks.

greg k-h