The two main bugs were identified in Linux first, and I've modelled Xen's fix
similarly.
Patches 1-4 want committing together. They do bisect and operate correctly,
but the range takes out an optimisation in order to reimplement it correctly.
https://gitlab.com/xen-project/hardware/xen-staging/-/pipelines/1905583317
Andrew Cooper (6):
x86/idle: Remove broken MWAIT implementation
x86/idle: Drop incorrect smp_mb() in mwait_idle_with_hints()
x86/idle: Convert force_mwait_ipi_wakeup to X86_BUG_MONITOR
xen/softirq: Rework arch_skip_send_event_check() into arch_set_softirq()
x86/idle: Implement a new MWAIT IPI-elision algorithm
x86/idle: Fix buggy "x86/mwait-idle: enable interrupts before C1 on Xeons"
xen/arch/x86/acpi/cpu_idle.c | 92 +++++++++++---------------
xen/arch/x86/cpu/intel.c | 2 +-
xen/arch/x86/cpu/mwait-idle.c | 8 +--
xen/arch/x86/hpet.c | 2 -
xen/arch/x86/include/asm/cpufeatures.h | 1 +
xen/arch/x86/include/asm/hardirq.h | 21 ++++--
xen/arch/x86/include/asm/mwait.h | 3 -
xen/arch/x86/include/asm/softirq.h | 48 +++++++++++++-
xen/common/softirq.c | 8 +--
xen/include/xen/cpuidle.h | 2 -
xen/include/xen/irq_cpustat.h | 1 -
xen/include/xen/softirq.h | 16 +++++
12 files changed, 124 insertions(+), 80 deletions(-)
--
2.39.5