Commit fe0ad890 authored by Jan Kiszka's avatar Jan Kiszka

x86: ipipe: Harden __speculation_ctrl_update for shared use

This service is also called by the primary domain as part of
__switch_to. Therefore, we need to harden other callers of it so that we
do not corrupt the state of the related MSR.

Silence lockdep_assert_irqs_disabled along this when I-pipe is on. It
will only report false positives.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 16f381fd
......@@ -419,7 +419,9 @@ static __always_inline void __speculation_ctrl_update(unsigned long tifp,
u64 msr = x86_spec_ctrl_base;
bool updmsr = false;
* If TIF_SSBD is different, select the proper mitigation
......@@ -475,9 +477,9 @@ void speculation_ctrl_update(unsigned long tif)
unsigned long flags;
/* Forced update. Make sure all relevant TIF flags are different */
flags = hard_local_irq_save();
__speculation_ctrl_update(~tif, tif);
/* Called from seccomp/prctl update */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment