File xsa471-12.patch of Package xen.39650
# Commit b0ca0f93f47c43f8984981137af07ca3d161e3ec
# Date 2025-07-04 19:03:32 +0100
# Author Andrew Cooper <andrew.cooper3@citrix.com>
# Committer Andrew Cooper <andrew.cooper3@citrix.com>
x86/idle: Convert force_mwait_ipi_wakeup to X86_BUG_MONITOR
We're going to want alternative-patch based on it.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
--- a/xen/arch/x86/acpi/cpu_idle.c
+++ b/xen/arch/x86/acpi/cpu_idle.c
@@ -437,14 +437,8 @@ static int __init cpu_idle_key_init(void
}
__initcall(cpu_idle_key_init);
-/* Force sending of a wakeup IPI regardless of mwait usage. */
-bool __read_mostly force_mwait_ipi_wakeup;
-
bool arch_skip_send_event_check(unsigned int cpu)
{
- if ( force_mwait_ipi_wakeup )
- return false;
-
return false;
}
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -391,7 +391,7 @@ static void __init probe_mwait_errata(vo
{
printk(XENLOG_WARNING
"Forcing IPI MWAIT wakeup due to CPU erratum\n");
- force_mwait_ipi_wakeup = true;
+ setup_force_cpu_cap(X86_BUG_MONITOR);
}
}
--- a/xen/include/asm-x86/cpufeatures.h
+++ b/xen/include/asm-x86/cpufeatures.h
@@ -52,6 +52,7 @@ XEN_CPUFEATURE(USE_VMCALL, X86_SY
#define X86_BUG_CLFLUSH_MFENCE X86_BUG( 2) /* MFENCE needed to serialise CLFLUSH */
#define X86_BUG_IBPB_NO_RET X86_BUG( 3) /* IBPB doesn't flush the RSB/RAS */
#define X86_BUG_CLFLUSH_MONITOR X86_BUG( 4) /* MONITOR requires CLFLUSH */
+#define X86_BUG_MONITOR X86_BUG( 5) /* MONITOR doesn't always notice writes (force IPIs) */
#define X86_SPEC_NO_LFENCE_ENTRY_PV X86_BUG(16) /* (No) safety LFENCE for SPEC_CTRL_ENTRY_PV. */
#define X86_SPEC_NO_LFENCE_ENTRY_INTR X86_BUG(17) /* (No) safety LFENCE for SPEC_CTRL_ENTRY_INTR. */
--- a/xen/include/asm-x86/mwait.h
+++ b/xen/include/asm-x86/mwait.h
@@ -11,9 +11,6 @@
#define MWAIT_ECX_INTERRUPT_BREAK 0x1
-/* Force sending of a wakeup IPI regardless of mwait usage. */
-extern bool force_mwait_ipi_wakeup;
-
void mwait_idle_with_hints(unsigned int eax, unsigned int ecx);
#endif /* __ASM_X86_MWAIT_H__ */