]> git.hungrycats.org Git - linux/commit
x86/xen: Get rid of last XEN_LAZY_MMU uses
authorJuergen Gross <jgross@suse.com>
Tue, 26 May 2026 15:05:13 +0000 (17:05 +0200)
committerJuergen Gross <jgross@suse.com>
Mon, 8 Jun 2026 07:21:06 +0000 (09:21 +0200)
commitbec6f41a6fe51368c6655b8686eed694eaab954b
tree33b3f1d5e355830382a6dd1c2804d3317ba4efeb
parent811f0d8caa407b7acd8d1ff9e2dd69835a7b3d9a
x86/xen: Get rid of last XEN_LAZY_MMU uses

There are only very few use cases of XEN_LAZY_MMU left. Get rid of
them in order to avoid having to call enter_lazy(XEN_LAZY_MMU) and
leave_lazy(XEN_LAZY_MMU).

The query in xen_batched_set_pte() can be replaced by using
is_lazy_mmu_mode_active() instead.

As xen_flush_lazy_mmu() will be called only with lazy MMU mode being
active, the test for the lazy mode can just be dropped.

In xen_start_context_switch() and xen_end_context_switch() use
__task_lazy_mmu_mode_pause() and __task_lazy_mmu_mode_resume(),
allowing to drop xen_enter_lazy_mmu() and xen_leave_lazy_mmu()
completely.

Call arch_flush_lazy_mmu_mode() from arch_leave_lazy_mmu_mode(), as
this is the only required action now.

Drop the lazy mmu enter and leave paravirt hooks, leaving the flush
hook as the only needed one.

Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20260526150514.129330-5-jgross@suse.com>
arch/x86/include/asm/paravirt.h
arch/x86/include/asm/paravirt_types.h
arch/x86/kernel/paravirt.c
arch/x86/xen/enlighten_pv.c
arch/x86/xen/mmu_pv.c