Skip to content

KVM/arm64: Early PSTATE evaluation fixes

Marc Zyngier kvm kvmarm linux-arm-kernel 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: arm64: Save PSTATE early on exitarch/arm64/kvm/hyp/include/hyp/switch.h arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h+12 -11 reply
2/2KVM: arm64: Move pkvm's special 32bit handling into a generic infrastructurearch/arm64/kvm/hyp/include/hyp/switch.h arch/arm64/kvm/hyp/nvhe/switch.c arch/arm64/kvm/hyp/vhe/switch.c+13 -71 reply

Reviews trailers per patch

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

PatchFuad Tabba
1/2T-b R-b
2/2R-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/arm64: Early PSTATE evaluation fixes

There are a number of cases where we evaluate PSTATE early on guest exit. Nothing wrong with that. Except that we actually synchronise KVM's view of PSTATE pretty late, way after we needed it. Oopsie boo.

Thankfully, there are only two paths that require it: GICv3 emulation for 32bit guests, and trap handling of 32bit guests in protected mode. There is no known need of the former (though you could enable it on the command line), and the latter is still a work in progress. In any case, this needs fixing.

Funnily enough, this is something that I had already solved on NV, so the solution isn't that different from what I have there.

Unless someone shouts, I intend to merge these as fixes.

Marc Zyngier (2):
KVM: arm64: Save PSTATE early on exit
KVM: arm64: Move pkvm's special 32bit handling into a generic
infrastructure

 arch/arm64/kvm/hyp/include/hyp/switch.h    | 14 ++++++++++++++
 arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h |  7 ++++++-
 arch/arm64/kvm/hyp/nvhe/switch.c           |  8 +-------
 arch/arm64/kvm/hyp/vhe/switch.c            |  4 ++++
 4 files changed, 25 insertions(+), 8 deletions(-)
Signature · 1 line
2.30.2