RE: Re: [????] Re: [PATCH] x86/bugs: Fix GDS mitigation check for CPUs without ARCH_CAP_GDS_CTRL
From: Li,Rongqing
Date: Fri Aug 15 2025 - 20:16:47 EST
>
> 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
>
> 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);