Re: [PATCH v2 4/4] arm64: mte: Add mte_clear_folio_tags()
From: Catalin Marinas
Date: Thu Oct 29 2026 - 18:05:45 EST
On Wed, Oct 21, 2026 at 12:07:00PM +0100, Fuad Tabba wrote:
> mte_sync_tags(), sanitise_mte_tags() and kvm_vm_ioctl_mte_copy_tags()
> each open-code the loop that clears the tags of every page in a hugetlb
> folio. Add mte_clear_folio_tags() and use it in all three.
> kvm_vm_ioctl_mte_copy_tags() then tests for hugetlb first, as it does
> where it sets the tagged flag below.
>
> No functional change intended.
>
> Suggested-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
> Signed-off-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
Reviewed-by: Catalin Marinas <catalin.marinas@xxxxxxx>