Re: [PATCH v3] KVM: arm64: Optimize protected mode with FWB and DIC

Marc Zyngier <[email protected]>
Newsgroups dev.linux.lists.kvmarm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu, 23 Jul 2026 17:20:02 +0100,
Mostafa Saleh <[email protected]> wrote:
> 
> KVM opportunistically enables FWB if supported by the system for guest
> VMs, which allows it to elude cache maintenance for data as they are
> forced to be cacheable from stage-2.
> In that case, __clean_dcache_guest_page() will immediately return.
> However in protected mode, before calling __clean_dcache_guest_page()
> it loops over the range and fix_map/unmap it, issuing TLB
> invalidations, dsb() and isb() unnecessarily.
> 
> This can be optimized by returning early if FWB is supported,
> kvm_pgtable_stage2_map() already issues dsb() and tlb invalidation
> functions issue dsb() for the unmap path.
> 
> Similarly for DIC, we can omit the call in
> invalidate_icache_guest_page()
> 
> No isb() needed as ERET is context synchronization event.
> 
> Signed-off-by: Mostafa Saleh <[email protected]>

Acked-by: Marc Zyngier <[email protected]>

	M.

-- 
Without deviation from the norm, progress is not possible.
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.