linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: arm64: VTCR_EL2 conversion to feature dependency framework
@ 2025-11-29 14:45 Marc Zyngier
  2025-11-29 14:45 ` [PATCH 1/4] arm64: Convert ID_AA64MMFR0_EL1.TGRAN{4,16,64}_2 to UnsignedEnum Marc Zyngier
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Marc Zyngier @ 2025-11-29 14:45 UTC (permalink / raw)
  To: kvmarm, linux-arm-kernel, kvm
  Cc: Joey Gouly, Suzuki K Poulose, Oliver Upton, Zenghui Yu,
	Alexandru Elisei

Alexandru recently pointed out [0] that the RES0 handling of VTCR_EL2
was broken now that we have some support for stage-2 AF.

Instead of addressing this piecemeal as Alexandru was suggesting in
his series, I've taken the approach to do a full-blown conversion,
including moving VTCR_EL2 to the sysreg file (the latter resulting in
a bit of churn in the page table code, both canonical and nested).

The result is, as usual, on the larger side of things, but mostly made
of generated stuff, though the definition for FEAT_LPA2 is horrific,
and required some adjustments to the way we define TGRAN*_2.

Lightly tested on M2.

[0] https://lore.kernel.org/r/20251128100946.74210-1-alexandru.elisei@arm.com

Marc Zyngier (4):
  arm64: Convert ID_AA64MMFR0_EL1.TGRAN{4,16,64}_2 to UnsignedEnum
  arm64: Convert VTCR_EL2 to sysreg infratructure
  KVM: arm64: Account for RES1 bits in DECLARE_FEAT_MAP()
  KVM: arm64: Convert VTCR_EL2 to config-driven sanitisation

 arch/arm64/include/asm/kvm_arm.h | 52 ++++++-----------------
 arch/arm64/include/asm/sysreg.h  |  1 -
 arch/arm64/kvm/config.c          | 72 +++++++++++++++++++++++++++++++-
 arch/arm64/kvm/hyp/pgtable.c     |  8 ++--
 arch/arm64/kvm/nested.c          | 11 +++--
 arch/arm64/tools/sysreg          | 63 ++++++++++++++++++++++++++--
 6 files changed, 151 insertions(+), 56 deletions(-)

-- 
2.47.3



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

end of thread, other threads:[~2025-12-03 16:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-29 14:45 [PATCH 0/4] KVM: arm64: VTCR_EL2 conversion to feature dependency framework Marc Zyngier
2025-11-29 14:45 ` [PATCH 1/4] arm64: Convert ID_AA64MMFR0_EL1.TGRAN{4,16,64}_2 to UnsignedEnum Marc Zyngier
2025-11-29 14:45 ` [PATCH 2/4] arm64: Convert VTCR_EL2 to sysreg infratructure Marc Zyngier
2025-12-03 11:43   ` Alexandru Elisei
2025-11-29 14:45 ` [PATCH 3/4] KVM: arm64: Account for RES1 bits in DECLARE_FEAT_MAP() Marc Zyngier
2025-11-29 14:45 ` [PATCH 4/4] KVM: arm64: Convert VTCR_EL2 to config-driven sanitisation Marc Zyngier
2025-12-03 11:44   ` Alexandru Elisei
2025-12-03 13:00     ` Marc Zyngier
2025-12-03 14:03       ` Alexandru Elisei
2025-12-03 14:58         ` Marc Zyngier
2025-12-03 15:20           ` Alexandru Elisei
2025-12-03 16:17   ` Joey Gouly
2025-12-03 16:43     ` Marc Zyngier

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