All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] KVM: arm: Refuse to enable KVM on systems with SME but not FGT
@ 2022-10-27 20:52 ` Mark Brown
  0 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2022-10-27 20:52 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: Peter Maydell, Richard Henderson, Vincent Donnefort, James Morse,
	Alexandru Elisei, Suzuki K Poulose, Oliver Upton,
	linux-arm-kernel, kvmarm, Mark Brown

The architecture requires that any system which implements SME also has
fine grained traps since SME is a v9.2 feature, meaning that v8.7 must be
implemented, and FGT is mandatory from v8.6. SME relies on fine grained
traps to control access to SMPRI_EL1 and in nVHE mode to TPIDR2_EL0,
without traps SMPRI_EL1.Priority and TPIDR2_EL0 can be used as side
channels. 

This series adds support for detecting FGT and refuses to allow KVM to
be used in architecturally invalid configurations which have SME but not
FGT, without detection the issue presents as faults due to EL2
attempting to access the FGT registers which isn't obvious to users.
Currently fine grained traps are only used in nVHE but but a series
"arm64/sme: Fix SMPRI_EL1 traps for KVM guests" sent along with this
will add usage for VHE mode too making the issue more pressing.

Mark Brown (2):
  arm64/cpufeature: Add feature detection for fine grained traps
  KVM: arm: Refuse to enable KVM on systems with FEAT_SME but not
    FEAT_FGT

 arch/arm64/kernel/cpufeature.c | 11 +++++++++++
 arch/arm64/kvm/arm.c           | 15 +++++++++++++++
 arch/arm64/tools/cpucaps       |  1 +
 3 files changed, 27 insertions(+)


base-commit: 9abf2313adc1ca1b6180c508c25f22f9395cc780
-- 
2.30.2


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

end of thread, other threads:[~2022-10-31 12:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-27 20:52 [PATCH v1 0/2] KVM: arm: Refuse to enable KVM on systems with SME but not FGT Mark Brown
2022-10-27 20:52 ` Mark Brown
2022-10-27 20:52 ` [PATCH v1 1/2] arm64/cpufeature: Add feature detection for fine grained traps Mark Brown
2022-10-27 20:52   ` Mark Brown
2022-10-27 20:52 ` [PATCH v1 2/2] KVM: arm: Refuse to enable KVM on systems with FEAT_SME but not FEAT_FGT Mark Brown
2022-10-27 20:52   ` Mark Brown
2022-10-27 21:17 ` [PATCH v1 0/2] KVM: arm: Refuse to enable KVM on systems with SME but not FGT Richard Henderson
2022-10-27 21:17   ` Richard Henderson
2022-10-29 11:46 ` Marc Zyngier
2022-10-29 11:46   ` Marc Zyngier
2022-10-30 17:44   ` Catalin Marinas
2022-10-30 17:44     ` Catalin Marinas
2022-10-31 12:38   ` Mark Brown
2022-10-31 12:38     ` Mark Brown

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.