From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v2] x86/intel: workaround several MONITOR/MWAIT errata
Date: Wed, 23 Apr 2025 16:08:34 +0200 [thread overview]
Message-ID: <aAj0Yqc0FtlTlVCF@macbook.lan> (raw)
In-Reply-To: <cd7c88b4-848b-4051-bbd6-8a8b78416ebd@citrix.com>
On Wed, Apr 23, 2025 at 02:13:01PM +0100, Andrew Cooper wrote:
> On 23/04/2025 12:32 pm, Roger Pau Monne wrote:
> > There are several errata on Intel regarding the usage of the MONITOR/MWAIT
> > instructions, all having in common that stores to the monitored region
> > might not wake up the CPU.
> >
> > Fix them by forcing the sending of an IPI for the affected models.
> >
> > The Ice Lake issue has been reproduced internally on XenServer hardware,
> > and the fix does seem to prevent it. The symptom was APs getting stuck in
> > the idle loop immediately after bring up, which in turn prevented the BSP
> > from making progress. This would happen before the watchdog was
> > initialized, and hence the whole system would get stuck.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > ---
> > Apollo and Lunar Lake fixes have not been tested, due to lack of hardware.
>
> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> > diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c
> > index 420198406def..1dbf15b01ed7 100644
> > --- a/xen/arch/x86/acpi/cpu_idle.c
> > +++ b/xen/arch/x86/acpi/cpu_idle.c
> > @@ -441,8 +441,14 @@ void cpuidle_wakeup_mwait(cpumask_t *mask)
> > cpumask_andnot(mask, mask, &target);
> > }
> >
> > +/* Force sending of a wakeup IPI regardless of mwait usage. */
> > +bool __ro_after_init force_mwait_ipi_wakeup;
> > +
> > bool arch_skip_send_event_check(unsigned int cpu)
> > {
> > + if ( force_mwait_ipi_wakeup )
> > + return false;
> > +
>
> I don't especially like this. The callers are a loop over all CPUs, and
> this can't be inlined/simplified automatically.
Hm, I can look into this later, I can make maybe turn
arch_skip_send_event_check into an inline. Let me get this
committed first.
Thanks, Roger.
next prev parent reply other threads:[~2025-04-23 14:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 11:32 [PATCH v2] x86/intel: workaround several MONITOR/MWAIT errata Roger Pau Monne
2025-04-23 13:05 ` Jan Beulich
2025-04-23 13:13 ` Andrew Cooper
2025-04-23 14:08 ` Roger Pau Monné [this message]
2025-04-25 12:36 ` Alejandro Vallejo
2025-04-25 12:44 ` Andrew Cooper
2025-04-25 12:55 ` Roger Pau Monné
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aAj0Yqc0FtlTlVCF@macbook.lan \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.