Re: [PATCH 00/18] Another attempt at HVO support on arm64
From: David Hildenbrand (Arm)
Date: Thu Jul 09 2026 - 06:03:22 EST
> -- The AF trick --
>
> The trick is that translations with the AF unset cannot be cached in the
> TLB (see Rule R_DWZCQ in the Arm ARM), so they can be atomically updated
> without needing a full break-before-make sequence.
>
> So the PTE update sequence becomes:
> 1. Atomically clear the AF on the existing PTE.
> 2. Invalidate the TLB.
> 3. cmpxchg the AF=0 PTE with the new PTE. If this fails, goto 1.
>
> If there is a CPU on the system that does not support hardware access
> flag updates, clearing the AF is problematic, as those CPUs might fault
> on the vmemmap usage. Therefore, HVO compatbility checks all CPUs for HW
> AF updates.
Pretty nice trick, I hope this will fly :)
--
Cheers,
David