1. 17 5月, 2018 1 次提交
    • T
      x86/speculation: Handle HT correctly on AMD · 1f50ddb4
      Thomas Gleixner 提交于
      The AMD64_LS_CFG MSR is a per core MSR on Family 17H CPUs. That means when
      hyperthreading is enabled the SSBD bit toggle needs to take both cores into
      account. Otherwise the following situation can happen:
      
      CPU0		CPU1
      
      disable SSB
      		disable SSB
      		enable  SSB <- Enables it for the Core, i.e. for CPU0 as well
      
      So after the SSB enable on CPU1 the task on CPU0 runs with SSB enabled
      again.
      
      On Intel the SSBD control is per core as well, but the synchronization
      logic is implemented behind the per thread SPEC_CTRL MSR. It works like
      this:
      
        CORE_SPEC_CTRL = THREAD0_SPEC_CTRL | THREAD1_SPEC_CTRL
      
      i.e. if one of the threads enables a mitigation then this affects both and
      the mitigation is only disabled in the core when both threads disabled it.
      
      Add the necessary synchronization logic for AMD family 17H. Unfortunately
      that requires a spinlock to serialize the access to the MSR, but the locks
      are only shared between siblings.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Reviewed-by: NBorislav Petkov <bp@suse.de>
      Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      1f50ddb4
  2. 10 5月, 2018 1 次提交
    • K
      x86/bugs: Rename _RDS to _SSBD · 9f65fb29
      Konrad Rzeszutek Wilk 提交于
      Intel collateral will reference the SSB mitigation bit in IA32_SPEC_CTL[2]
      as SSBD (Speculative Store Bypass Disable).
      
      Hence changing it.
      
      It is unclear yet what the MSR_IA32_ARCH_CAPABILITIES (0x10a) Bit(4) name
      is going to be. Following the rename it would be SSBD_NO but that rolls out
      to Speculative Store Bypass Disable No.
      
      Also fixed the missing space in X86_FEATURE_AMD_SSBD.
      
      [ tglx: Fixup x86_amd_rds_enable() and rds_tif_to_amd_ls_cfg() as well ]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      9f65fb29
  3. 03 5月, 2018 2 次提交