> -----Original Message-----
> From: Peter Zijlstra <pet...@infradead.org>
> Sent: Tuesday, April 29, 2025 11:59 PM
> To: Jani Nikula <jani.nik...@linux.intel.com>
> Cc: Borah, Chaitanya Kumar <chaitanya.kumar.bo...@intel.com>;
> l...@kernel.org; intel-gfx@lists.freedesktop.org; intel-
> x...@lists.freedesktop.org; Kurmi, Suresh Kumar
> <suresh.kumar.ku...@intel.com>; Saarinen, Jani <jani.saari...@intel.com>;
> De Marchi, Lucas <lucas.demar...@intel.com>; linux-ker...@vger.kernel.org;
> Ingo Molnar <mi...@kernel.org>
> Subject: Re: [REGRESSION] x86/efi: Make efi_enter/leave_mm() use the
> use_/unuse_temporary_mm() machinery (linux-next)
> 
> On Tue, Apr 29, 2025 at 12:01:22PM +0300, Jani Nikula wrote:
> > On Thu, 24 Apr 2025, "Borah, Chaitanya Kumar"
> <chaitanya.kumar.bo...@intel.com> wrote:
> > > +Andy, Ingo
> > >
> > > Friendly reminder.
> > > Issue is still seen on latest linux-next runs.
> > >
> > > https://intel-gfx-ci.01.org/tree/linux-next/next-20250424/bat-rpls-4
> > > /boot0.txt
> > >
> > > Regards
> > >
> > > Chaitanya
> >
> > Andy, Ingo -
> >
> > Commit e7021e2fe0b4 ("x86/efi: Make efi_enter/leave_mm() use the
> > use_/unuse_temporary_mm() machinery") on linux-next regresses as
> > reported by Chaitanya
> >
> > Please look into it.
> 
> Does your kernel include the below?

This change has not yet landed in linux-next. However, making local change on 
top of next-20250429 seems to help us.

Important to note that we don't CONFIG_DEBUG_VM=y as mentioned by Hugh.

Any idea when this lands in linux-next?

Regards

Chaitanya

> 
> ---
> commit aef1d0209ddf127a8069aca5fa3a062be4136b76
> Author: Peter Zijlstra <pet...@infradead.org>
> Date:   Fri Apr 18 11:50:34 2025 +0200
> 
>     x86/mm: Fix {,un}use_temporary_mm() IRQ state
> 
>     As the function switch_mm_irqs_off() implies, it ought to be called with
>     IRQs *off*. Commit 58f8ffa91766 ("x86/mm: Allow temporary MMs when
> IRQs
>     are on") caused this to not be the case for EFI.
> 
>     Ensure IRQs are off where it matters.
> 
>     Fixes: 58f8ffa91766 ("x86/mm: Allow temporary MMs when IRQs are on")
>     Reported-by: Borislav Petkov (AMD) <b...@alien8.de>
>     Tested-by: Borislav Petkov (AMD) <b...@alien8.de>
>     Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org>
>     Signed-off-by: Ingo Molnar <mi...@kernel.org>
>     Cc: H. Peter Anvin <h...@zytor.com>
>     Cc: Andrew Morton <a...@linux-foundation.org>
>     Cc: Andy Lutomirski <l...@kernel.org>
>     Cc: Linus Torvalds <torva...@linux-foundation.org>
>     Cc: Rik van Riel <r...@surriel.com>
>     Link:
> https://lore.kernel.org/r/20250418095034.gr38...@noisy.programming.kick
> s-ass.net
> 
> diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index
> 79c124f6f3f2..39761c7765bd 100644
> --- a/arch/x86/mm/tlb.c
> +++ b/arch/x86/mm/tlb.c
> @@ -986,6 +986,7 @@ struct mm_struct *use_temporary_mm(struct
> mm_struct *temp_mm)
>       struct mm_struct *prev_mm;
> 
>       lockdep_assert_preemption_disabled();
> +     guard(irqsave)();
> 
>       /*
>        * Make sure not to be in TLB lazy mode, as otherwise we'll end up
> @@ -1018,6 +1019,7 @@ struct mm_struct *use_temporary_mm(struct
> mm_struct *temp_mm)  void unuse_temporary_mm(struct mm_struct
> *prev_mm)  {
>       lockdep_assert_preemption_disabled();
> +     guard(irqsave)();
> 
>       /* Clear the cpumask, to indicate no TLB flushing is needed anywhere
> */
>       cpumask_clear_cpu(smp_processor_id(),
> mm_cpumask(this_cpu_read(cpu_tlbstate.loaded_mm)));

Reply via email to