Commit 1f0f387c 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.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 46330404
......@@ -476,9 +476,9 @@ void speculation_ctrl_update(unsigned long tif)
unsigned long flags;
/* Forced update. Make sure all relevant TIF flags are different */
local_irq_save(flags);
flags = hard_local_irq_save();
__speculation_ctrl_update(~tif, tif);
local_irq_restore(flags);
hard_local_irq_restore(flags);
}
/* 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