From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73477337BA2 for ; Mon, 15 Dec 2025 17:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765818986; cv=none; b=uKEmN2aAICj89XhBCCpg5EW8VRGpqMMs1ETQxeIG3ByeOy7Ob5M6iaZH9VHn61u8+bXlirFE7aFUyHILPuPr79SpBrcPsLbqr21JUs5+Bt2rfwNuXsYn8C6U12VtTKQ4lAgDCqNNujDuXFMwLplTVxUQNwVlX3iO7x1aHe48SFA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765818986; c=relaxed/simple; bh=/ov7pw2YftR1FUPwJyR2GpAxJ6/nAz4vxXUAkM6vm7M=; h=Date:To:From:Subject:Message-Id; b=L1BR+wzacDF95RSDi7BNPqe3z8gFvYOYuRx563HhUV18yAFFDQFYFASKK+vCYM82p2qRP9SjeSAGK/j6dnc2yymyus7S5ycuFx4SvccLs1WLnGKoJ9vzGyihk9wUi29wkbphGrN5RbtDjc94GcySyNJqLfzGDPrLy9/NoUtlMkk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=biyOsCAQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="biyOsCAQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D77D7C116B1; Mon, 15 Dec 2025 17:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1765818986; bh=/ov7pw2YftR1FUPwJyR2GpAxJ6/nAz4vxXUAkM6vm7M=; h=Date:To:From:Subject:From; b=biyOsCAQXVWaqx0VQ7MXxBSzMrQxJmHHWHQ01N3g7JBp6SLLr/U0onZ43+cq8IHBy ovEY8ZO949Mr4itHZho7drCqpq62lt772KyMIguYJcgUmaf6aYXIRzo/o1RautwAci USV9q3n0R2ah4P40p44b5XQCHexxvJJhd9l3shTg= Date: Mon, 15 Dec 2025 09:16:25 -0800 To: mm-commits@vger.kernel.org,yeoreum.yun@arm.com,will@kernel.org,venkat88@linux.ibm.com,vbabka@suse.cz,tglx@linutronix.de,surenb@google.com,ryan.roberts@arm.com,rppt@kernel.org,ritesh.list@gmail.com,peterz@infradead.org,npiggin@gmail.com,mpe@ellerman.id.au,mingo@redhat.com,mhocko@suse.com,maddy@linux.ibm.com,lorenzo.stoakes@oracle.com,liam.howlett@oracle.com,jgross@suse.com,jannh@google.com,hpa@zytor.com,dwmw2@infradead.org,david@redhat.com,david@kernel.org,davem@davemloft.net,christophe.leroy@csgroup.eu,catalin.marinas@arm.com,bp@alien8.de,boris.ostrovsky@oracle.com,anshuman.khandual@arm.com,andreas@gaisler.com,agordeev@linux.ibm.com,kevin.brodsky@arm.com,akpm@linux-foundation.org From: Andrew Morton Subject: + x86-xen-simplify-flush_lazy_mmu.patch added to mm-new branch Message-Id: <20251215171625.D77D7C116B1@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: x86/xen: simplify flush_lazy_mmu() has been added to the -mm mm-new branch. Its filename is x86-xen-simplify-flush_lazy_mmu.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/x86-xen-simplify-flush_lazy_mmu.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Kevin Brodsky Subject: x86/xen: simplify flush_lazy_mmu() Date: Mon, 15 Dec 2025 15:03:11 +0000 arch_flush_lazy_mmu_mode() is called when outstanding batched pgtable operations must be completed immediately. There should however be no need to leave and re-enter lazy MMU completely. The only part of that sequence that we really need is xen_mc_flush(); call it directly. Link: https://lkml.kernel.org/r/20251215150323.2218608-3-kevin.brodsky@arm.com Signed-off-by: Kevin Brodsky Reviewed-by: David Hildenbrand Reviewed-by: Ryan Roberts Reviewed-by: Juergen Gross Reviewed-by: Anshuman Khandual Reviewed-by: Yeoreum Yun Cc: Alexander Gordeev Cc: Andreas Larsson Cc: Borislav Betkov Cc: Boris Ostrovsky Cc: Catalin Marinas Cc: Christophe Leroy Cc: David Hildenbrand (Red Hat) Cc: David S. Miller Cc: David Woodhouse Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Liam Howlett Cc: Lorenzo Stoakes Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Michal Hocko Cc: Mike Rapoport Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Ritesh Harjani (IBM) Cc: Suren Baghdasaryan Cc: Thomas Gleinxer Cc: Venkat Rao Bagalkote Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton --- arch/x86/xen/mmu_pv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) --- a/arch/x86/xen/mmu_pv.c~x86-xen-simplify-flush_lazy_mmu +++ a/arch/x86/xen/mmu_pv.c @@ -2139,10 +2139,8 @@ static void xen_flush_lazy_mmu(void) { preempt_disable(); - if (xen_get_lazy_mode() == XEN_LAZY_MMU) { - arch_leave_lazy_mmu_mode(); - arch_enter_lazy_mmu_mode(); - } + if (xen_get_lazy_mode() == XEN_LAZY_MMU) + xen_mc_flush(); preempt_enable(); } _ Patches currently in -mm which might be from kevin.brodsky@arm.com are x86-xen-simplify-flush_lazy_mmu.patch powerpc-mm-implement-arch_flush_lazy_mmu_mode.patch sparc-mm-implement-arch_flush_lazy_mmu_mode.patch mm-clarify-lazy_mmu-sleeping-constraints.patch mm-introduce-config_arch_has_lazy_mmu_mode.patch mm-introduce-generic-lazy_mmu-helpers.patch mm-bail-out-of-lazy_mmu_mode_-in-interrupt-context.patch mm-enable-lazy_mmu-sections-to-nest.patch arm64-mm-replace-tif_lazy_mmu-with-is_lazy_mmu_mode_active.patch powerpc-mm-replace-batch-active-with-is_lazy_mmu_mode_active.patch sparc-mm-replace-batch-active-with-is_lazy_mmu_mode_active.patch x86-xen-use-lazy_mmu_state-when-context-switching.patch mm-add-basic-tests-for-lazy_mmu.patch