Re: [PATCH 12/18] arm64: Implement try_populate_vmemmap_pmd using AF trick

Catalin Marinas <[email protected]>
Newsgroups org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On Wed, Jul 08, 2026 at 03:11:22AM +0000, James Houghton wrote:
> This routine is to be used for updating in-use, leaf-level PMDs in the
> vmemmap without introducing a window where vmemmap accesses might fault.
> 
> Implementing this on arm64 requires some care: use the same access flag
> trick that is used for vmemmap PTE updates. HAFT is not needed and the
> TLB flushing routine remains identical, as we are not overwriting a
> non-leaf PMD.
> 
> For systems that support BBML2_NOABORT, there is no need to use the AF
> trick.

This part needs even more text in the Arm ARM. With dropping of the
BBML2_NOABORT requirement in patch 13, we are left with the D8.17.2
rules in the Arm ARM (M.c) requiring BBM. I'm not sure we can infer much
from the AF=0 caching rules as here we talk about the walk caches. For
example, a walk cache memorises the VA to block descriptor translation
and that's irrespective of the leaf entry AF bit. If AF=0 and you skip
the TLBI, nothing flushes the walk cache which may confuse the CPU when
it suddenly sees a table entry where it expected a block one.

If it's not critical to the series, I suggest we leave this patch and
the next one out for now.

-- 
Catalin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.