[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251223193440.1441657-1-pekangas@google.com>
Date: Tue, 23 Dec 2025 19:34:39 +0000
From: Petteri Kangaslampi <pekangas@...gle.com>
To: kvmarm@...ts.linux.dev
Cc: Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>,
Vincent Donnefort <vdonnefort@...gle.com>, Joey Gouly <joey.gouly@....com>,
Suzuki K Poulose <suzuki.poulose@....com>, Zenghui Yu <yuzenghui@...wei.com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Petteri Kangaslampi <pekangas@...gle.com>
Subject: [PATCH 0/1] KVM: arm64: Fix hyp VA size between layout and MMU
All,
In the KVM initialization code, kvm_mmu_init() and
kvm_compute_layout() use different logic when determining the
hypervisor's virtual address space size. Specifically, the MMU code
uses the larger of vabits_actual (the kernel's VA size) and
IDMAP_VA_BITS (48 bits), while the VA layout code just uses the
kernel's VA size.
This means that if the kernel is configured with a VA size of less
than 48 bits (like happens in our environment), the assumptions used
to calculate hyp_physvirt_offset and the code that determines VA
ranges to use for mappings in hyp/nvhe/mm.c get out of sync, which can
results in mapping failures.
The immediate fix is pretty obvious and attached here. This is against
6.12 but I don't think this code has changed recently. I think longer
term refactoring knowledge of the hypervisor's address space into one
place might be helpful; currently it is a bit spread out.
Petteri Kangaslampi (1):
KVM: arm64: Fix hyp VA size between layout and MMU
arch/arm64/kvm/va_layout.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
--
2.52.0.351.gbe84eed79e-goog
Powered by blists - more mailing lists