[PATCH 00/18] Another attempt at HVO support on arm64

David Hildenbrand (Arm) david at kernel.org
Thu Jul 9 02:58:03 PDT 2026


> -- 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



More information about the linux-arm-kernel mailing list