linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM/arm64: Early PSTATE evaluation fixes
@ 2021-11-23 14:22 Marc Zyngier
  2021-11-23 14:22 ` [PATCH 1/2] KVM: arm64: Save PSTATE early on exit Marc Zyngier
  2021-11-23 14:22 ` [PATCH 2/2] KVM: arm64: Move pkvm's special 32bit handling into a generic infrastructure Marc Zyngier
  0 siblings, 2 replies; 5+ messages in thread
From: Marc Zyngier @ 2021-11-23 14:22 UTC (permalink / raw)
  To: kvmarm, kvm, linux-arm-kernel
  Cc: James Morse, Suzuki K Poulose, Alexandru Elisei, Will Deacon,
	Quentin Perret, Fuad Tabba, kernel-team

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(-)

-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-24 13:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-23 14:22 [PATCH 0/2] KVM/arm64: Early PSTATE evaluation fixes Marc Zyngier
2021-11-23 14:22 ` [PATCH 1/2] KVM: arm64: Save PSTATE early on exit Marc Zyngier
2021-11-24 13:08   ` Fuad Tabba
2021-11-23 14:22 ` [PATCH 2/2] KVM: arm64: Move pkvm's special 32bit handling into a generic infrastructure Marc Zyngier
2021-11-24 13:11   ` Fuad Tabba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).