Skip to contentSkip to conversation

[????] Re: [PATCH] x86/bugs: Fix GDS mitigation check for CPUs without ARCH_CAP_GDS_CTRL

DISCUSSION Li,Rongqing 1 participant 1 message Aug 16, 2025

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines

How is that a problem? That is how it was originally implemented.

Infact, the following checks are required for the correct behavior:

You are right, I will resend this patch

Thanks

-Li

Quoted 24 lines
         if (mcu_ctrl & GDS_MITG_LOCKED) {
                 if (gds_mitigation == GDS_MITIGATION_OFF)
                         pr_warn("Mitigation locked. Disable failed.\n");
	...
                 gds_mitigation = GDS_MITIGATION_FULL_LOCKED;
         }

If the GDS microcode mitigation is locked before the kernel boot, MSR write for OFF will not take effect anyways. And you report OFF when the mitigation is locked to ON. While also triggering below WARN_ON_ONCE():

update_gds_msr()
{
...
/*
* Check to make sure that the WRMSR value was not ignored.
Writes to
* GDS_MITG_DIS will be ignored if this processor is locked but the
boot

          * processor was not.
          */
         rdmsrq(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl_after);
         WARN_ON_ONCE(mcu_ctrl != mcu_ctrl_after);