Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • arch
  • x86
  • kernel
  • cpu
  • microcode
  • core.c
Find file BlameHistoryPermalink
  • Borislav Petkov's avatar
    x86/cpu: Load microcode during restore_processor_state() · f9e14dbb
    Borislav Petkov authored Apr 19, 2022
    When resuming from system sleep state, restore_processor_state()
    restores the boot CPU MSRs. These MSRs could be emulated by microcode.
    If microcode is not loaded yet, writing to emulated MSRs leads to
    unchecked MSR access error:
    
      ...
      PM: Calling lapic_suspend+0x0/0x210
      unchecked MSR access error: WRMSR to 0x10f (tried to write 0x0...0) at rIP: ... (native_write_msr)
      Call Trace:
        <TASK>
        ? restore_processor_state
        x86_acpi_suspend_lowlevel
        acpi_suspend_enter
        suspend_devices_and_enter
        pm_suspend.cold
        state_store
        kobj_attr_store
        sysfs_kf_write
        kernfs_fop_write_iter
        new_sync_write
        vfs_write
        ksys_write
        __x64_sys_write
        do_syscall_64
        entry_SYSCALL_64_after_hwframe
       RIP: 0033:0x7fda13c260a7
    
    To ensure microcode emulated MSRs are available for restoration, load
    the microcode on the boot CPU before restoring these MSRs.
    
      [ Pawan: write commit message and productize it. ]
    
    Fixes: e2a1256b
    
     ("x86/speculation: Restore speculation related MSRs during S3 resume")
    Reported-by: default avatarKyle D. Pelton <kyle.d.pelton@intel.com>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Signed-off-by: default avatarPawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Tested-by: default avatarKyle D. Pelton <kyle.d.pelton@intel.com>
    Cc: stable@vger.kernel.org
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=215841
    Link: https://lore.kernel.org/r/4350dfbf785cd482d3fafa72b2b49c83102df3ce.1650386317.git.pawan.kumar.gupta@linux.intel.com
    f9e14dbb
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7