On 1/26/26 17:50, Kalyazin, Nikita wrote: > From: Patrick Roy <[email protected]> > > Support for GUEST_MEMFD_FLAG_NO_DIRECT_MAP on arm64 depends on 1) direct > map manipulations at 4k granularity being possible, and 2) FEAT_S2FWB. > > 1) is met whenever the direct map is set up at 4k granularity (e.g. not > with huge/gigantic pages) at boottime, as due to ARM's > break-before-make semantics, breaking huge mappings into 4k mappings in > the direct map is not possible (BBM would require temporary invalidation > of the entire huge mapping, even if only a 4k subrange should be zapped, > which will probably crash the kernel). However, the current default for > rodata_full is true, which forces a 4k direct map. > > 2) is required to allow KVM to elide cache coherency operations when > installing stage 2 page tables, which require the direct map to be > entry for the newly mapped memory to be present (which it will not be, > as guest_memfd would have removed direct map entries in > kvm_gmem_get_pfn()). > > Cc: Will Deacon <[email protected]> > Signed-off-by: Patrick Roy <[email protected]> > Signed-off-by: Nikita Kalyazin <[email protected]> > ---
Reviewed-by: David Hildenbrand (Arm) <[email protected]> -- Cheers, David

