[PATCH v2 0/4] KVM: arm64: Handle unsupported guest translation granule sizes
From: Wei-Lin Chang
Date: Mon Apr 13 2026 - 20:05:12 EST
Hi,
This is v2 of fixing the granule size selection for software stage-1
and stage-2 walks. Thanks to Marc for the feedback on v1 ([1]).
* Changes from v1:
- Take the entire (v)tcr value for TGx decode helpers.
- Rename vtcr_to_walk_info() to setup_s2_walk() as preparation, also
pass vcpu as the argument instead of kvm.
- Use TCR_* instead of TCR_EL1_* definitions.
- Return unsigned int instead of u64 when returning a granule shift.
- Split unit changes in get_guest_mapping_ttl() and
compute_tlb_inval_range() into its own patch.
Thanks!
[1]: https://lore.kernel.org/kvmarm/20260406164618.3312473-1-weilin.chang@xxxxxxx/
Wei-Lin Chang (4):
KVM: arm64: nv: Rename vtcr_to_walk_info() to setup_s2_walk()
KVM: arm64: Factor out TG0/1 decoding of VTCR and TCR
KVM: arm64: nv: Use literal granule size in TLBI range calculation
KVM: arm64: Fallback to a supported value for unsupported guest TGx
arch/arm64/kvm/at.c | 125 ++++++++++++++++++++++++++--------
arch/arm64/kvm/nested.c | 144 +++++++++++++++++++++++++++-------------
2 files changed, 196 insertions(+), 73 deletions(-)
--
2.43.0