Re: [PATCH v2 5/5] x86/idle: Disable IBRS entering mwait idle and enable it on wakeup

From: Waiman Long
Date: Wed Jun 21 2023 - 10:10:08 EST


On 6/21/23 03:32, Peter Zijlstra wrote:
On Tue, Jun 20, 2023 at 10:06:25AM -0400, Waiman Long wrote:
When a user sets "intel_idle.max_cstate=0", it will disable
intel_idle and fall back to acpi_idle instead. The acpi_idle code
will then call mwait_idle_with_hints() to enter idle state. So when
X86_FEATURE_KERNEL_IBRS is enabled, it is necessary to disable IBRS
within mwait_idle_with_hints() when IRQ was disabled to avoid performance
degradation on silbing thread running user workload.
Urgh, no, just no. This is nasty.

OK, will take this out in the next version.

Cheers,
Longman