[PATCH V2 2/2] arm64/mm: Add remaining TLBI_XXX_MASK macros

Ben Horgan ben.horgan at arm.com
Fri Oct 24 01:56:30 PDT 2025


Hi Anshuman,

On 10/24/25 05:02, Anshuman Khandual wrote:
> Add remaining TLBI_XXX_MASK macros and replace current open encoded fields.
> While here replace hard coded page size based shifts but with derived ones
> via ilog2() thus adding some required context.
> 
> TLBI_TTL_MASK has been split into separate TLBI_TTL_MASK and TLBI_TG_MASK
> as appropriate because currently it simultaneously contains both page size
> and translation table level information. KVM on arm64 has been updated to
> accommodate these changes to TLBI_TTL_MASK.
> 
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Marc Zyngier <maz at kernel.org>
> Cc: Oliver Upton <oliver.upton at linux.dev>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-kernel at vger.kernel.org
> Cc: kvmarm at lists.linux.dev
> Signed-off-by: Anshuman Khandual <anshuman.khandual at arm.com>
> ---
>  arch/arm64/include/asm/tlbflush.h | 26 ++++++++++++++++++--------
>  arch/arm64/kvm/nested.c           |  8 +++++---
>  2 files changed, 23 insertions(+), 11 deletions(-)
> 
The code looks correct to me, no functional changes. I however, don't
have any experience with this code and so don't know whether the split
of TTL into TG and TTL is a good idea or not and if the kvm naming is
best to stay the same or be updated to match this.

Thanks,

Ben




More information about the linux-arm-kernel mailing list