All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: Fix HCRX_EL2.GCSEn handling
@ 2025-04-30 10:59 Marc Zyngier
  2025-04-30 10:59 ` [PATCH 1/2] KVM: arm64: Properly save/restore HCRX_EL2 Marc Zyngier
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marc Zyngier @ 2025-04-30 10:59 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm
  Cc: Joey Gouly, Suzuki K Poulose, Oliver Upton, Zenghui Yu,
	Will Deacon, Catalin Marinas, Mark Brown

Will points out[1] that GCS is completely busted on the host if we
ever run a guest, as HCRX_EL2 gets set to a fixed value on vcpu exit,
value that doesn't include the GCSEn bit. This is likely to kaboom on
a nVHE/hVHE setup.

Obviously, nobody ever tested this.

This series moves the handling of HCRX_EL2 to being correctly
saved/restored, which should address the problem. I say "should", as
in keeping with the tradition, I haven't tested it either. Or at least
not with GCS, as I don't have the correct SW setup (I don't even know
what you need to enable GCS).

I'd very much appreciate some help in testing this.

Marc Zyngier (2):
  KVM: arm64: Properly save/restore HCRX_EL2
  KVM: arm64: Kill HCRX_HOST_FLAGS

 arch/arm64/include/asm/el2_setup.h      |  2 +-
 arch/arm64/include/asm/kvm_arm.h        |  1 -
 arch/arm64/kvm/hyp/include/hyp/switch.h | 13 ++++++-------
 3 files changed, 7 insertions(+), 9 deletions(-)

-- 
2.39.2


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

end of thread, other threads:[~2025-05-07  7:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30 10:59 [PATCH 0/2] KVM: arm64: Fix HCRX_EL2.GCSEn handling Marc Zyngier
2025-04-30 10:59 ` [PATCH 1/2] KVM: arm64: Properly save/restore HCRX_EL2 Marc Zyngier
2025-04-30 10:59 ` [PATCH 2/2] KVM: arm64: Kill HCRX_HOST_FLAGS Marc Zyngier
2025-05-07  7:56 ` [PATCH 0/2] KVM: arm64: Fix HCRX_EL2.GCSEn handling Oliver Upton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.