lkml.org 
[lkml]   [2024]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    SubjectRe: [PATCH 15/14] x86/gds: Lock GDS mitigation when keylocker feature is present
    From
    On 4/19/24 10:47, Pawan Gupta wrote:
    > + u64 gds_lock = 0;
    >
    > switch (gds_mitigation) {
    > case GDS_MITIGATION_OFF:
    > @@ -769,6 +769,8 @@ void update_gds_msr(void)
    > * the same state. Make sure the mitigation is enabled on all
    > * CPUs.
    > */
    > + gds_lock = GDS_MITG_LOCKED;
    Can't we just drop the new gds_lock var and set mcu_ctrl |= GDS_MITG_LOCKED here?
    > + fallthrough;
    > case GDS_MITIGATION_FULL:
    > rdmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl);
    > mcu_ctrl &= ~GDS_MITG_DIS;
    > @@ -779,6 +781,7 @@ void update_gds_msr(void)
    > return;
    > }
    >
    > + mcu_ctrl |= gds_lock;
    > wrmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl);



    \
     
     \ /
      Last update: 2024-05-27 16:47    [W:5.033 / U:1.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site