On Wed, Jun 21, 2023 at 08:36:01PM -0400, Waiman Long wrote:I added the comment here because I had taken out the MSR restoration code. We can always replace that later on if there is a better way to do that.
+/*FWIW, we could in theory do so by marking the smp_ops.play_dead function
+ * naitve_play_dead() is essentially a __noreturn function, but it can't
+ * be marked as such as the compiler may complain about it.
+ */
pointer as __noreturn, but it would be tricky to teach objtool how to
understand that.
void native_play_dead(void)Can update_spec_ctrl() be used instead?
{
+ if (cpu_feature_enabled(X86_FEATURE_KERNEL_IBRS)) {
+ this_cpu_write(x86_spec_ctrl_current, 0);
+ native_wrmsrl(MSR_IA32_SPEC_CTRL, 0);
+ }