[PATCH v4 56/61] arm64: kvm: avoid CONFIG_PGTABLE_LEVELS for runtime levels

Oliver Upton oliver.upton at linux.dev
Mon Oct 23 23:55:46 PDT 2023


On Tue, Sep 12, 2023 at 02:16:46PM +0000, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb at kernel.org>
> 
> get_user_mapping_size() uses vabits_actual and CONFIG_PGTABLE_LEVELS to
> provide the starting point for a table walk. This is fine for LVA, as
> the number of translation levels is the same regardless of whether LVA
> is enabled. However, with LPA2, this will no longer be the case, so
> let's derive the number of levels from the number of VA bits directly.
> 
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>

Acked-by: Oliver Upton <oliver.upton at linux.dev>

-- 
Thanks,
Oliver



More information about the linux-arm-kernel mailing list