Re: [PATCH v2 2/5] x86/idle: Disable IBRS when cpu is offline

From: Peter Zijlstra
Date: Wed Jun 21 2023 - 10:53:31 EST


On Wed, Jun 21, 2023 at 10:44:23AM -0400, Waiman Long wrote:

> Well, hlt_play_dead() is only called if cpuidle_play_dead() returns an error
> which is not the typical case. My testing does confirm that this patch is
> able to keep the IBRS bit off when a CPU is offline via its online sysfs
> file.

The point is; your re-enable IBRS hunk at the end is dead-code. It
should never ever run and having it is confusing.