lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0ixYR-tsSfcotc=ezwpcX3a79bC_hDQPFLGF1zjk4yLOg@mail.gmail.com>
Date: Fri, 8 Nov 2024 15:34:51 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Len Brown <lenb@...nel.org>
Cc: peterz@...radead.org, x86@...nel.org, rafael@...nel.org, 
	linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org, 
	Len Brown <len.brown@...el.com>, stable@...r.kernel.org
Subject: Re: [PATCH] x86/cpu: Add INTEL_LUNARLAKE_M to X86_BUG_MONITOR

On Fri, Nov 8, 2024 at 2:52 PM Len Brown <lenb@...nel.org> wrote:
>
> From: Len Brown <len.brown@...el.com>
>
> Under some conditions, MONITOR wakeups on Lunar Lake processors
> can be lost, resulting in significant user-visible delays.
>
> Add LunarLake to X86_BUG_MONITOR so that wake_up_idle_cpu()
> always sends an IPI, avoiding this potential delay.
>
> Also update the X86_BUG_MONITOR workaround to handle
> the new smp_kick_mwait_play_dead() path.
>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219364
>
> Cc: stable@...r.kernel.org # 6.11
> Signed-off-by: Len Brown <len.brown@...el.com>

Overall

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

> ---
>  arch/x86/kernel/cpu/intel.c | 3 ++-
>  arch/x86/kernel/smpboot.c   | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
> index e7656cbef68d..aa63f5f780a0 100644
> --- a/arch/x86/kernel/cpu/intel.c
> +++ b/arch/x86/kernel/cpu/intel.c
> @@ -586,7 +586,8 @@ static void init_intel(struct cpuinfo_x86 *c)
>              c->x86_vfm == INTEL_WESTMERE_EX))
>                 set_cpu_bug(c, X86_BUG_CLFLUSH_MONITOR);
>
> -       if (boot_cpu_has(X86_FEATURE_MWAIT) && c->x86_vfm == INTEL_ATOM_GOLDMONT)
> +       if (boot_cpu_has(X86_FEATURE_MWAIT) &&
> +                       (c->x86_vfm == INTEL_ATOM_GOLDMONT || c->x86_vfm == INTEL_LUNARLAKE_M))
>                 set_cpu_bug(c, X86_BUG_MONITOR);
>
>  #ifdef CONFIG_X86_64
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 766f092dab80..910cb2d72c13 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -1377,6 +1377,9 @@ void smp_kick_mwait_play_dead(void)
>                 for (i = 0; READ_ONCE(md->status) != newstate && i < 1000; i++) {
>                         /* Bring it out of mwait */
>                         WRITE_ONCE(md->control, newstate);
> +                       /* If MONITOR unreliable, send IPI */
> +                       if (boot_cpu_has_bug(X86_BUG_MONITOR))
> +                               __apic_send_IPI(cpu, RESCHEDULE_VECTOR);

The  __apic_send_IPI() call could be wrapped into something like
__native_smp_send_reschedule() to underline the analogy between this
and what happens in native_smp_send_reschedule().

It is still fine as is though IMV.

>                         udelay(5);
>                 }
>
> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ