Skip to content

Prevent attempting updates known to fail

Alejandro Vallejo xen-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest4 patches 3 repliesIn review
  2. v73 patches 3 repliesSuperseded
  3. v63 patches 4 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v54 patches12 repliesSuperseded
v44 patches4 repliesSuperseded
v35 patches14 repliesSuperseded

Changes in v8 from the cover letter

* Fixed last bits mentioned by Jan in v7/patch1 (v8/patch2)
* Rolled back to having new printk as INFO
* Added v8/patch1 to ensure the existing early exit from early_cpu_init() has INFO severity as well.

Patches in v8 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/microcode: WARN->INFO for the "no ucode loading" log messagexen/arch/x86/cpu/microcode/core.c+1 -11 reply
2/4x86/microcode: Ignore microcode loading interface for revision = -1xen/arch/x86/cpu/microcode/core.c+15 -20 replies
3/4x86: Read MSR_ARCH_CAPS immediately after early_microcode_init()xen/arch/x86/cpu/common.c xen/arch/x86/cpu/microcode/core.c xen/arch/x86/include/asm/setup.h +2 more+30 -190 replies
4/4x86/microcode: Disable microcode update handler if DIS_MCU_UPDATE is setxen/arch/x86/cpu/microcode/core.c xen/arch/x86/cpu/microcode/intel.c xen/arch/x86/cpu/microcode/private.h +2 more+40 -60 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchJan BeulichHenry Wang
SeriesRelease-acked-by
1/4A-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 0/4] Prevent attempting updates known to fail

Now that XENLOG_INFO is the default logging level...

v8:
* Fixed last bits mentioned by Jan in v7/patch1 (v8/patch2)
* Rolled back to having new printk as INFO
* Added v8/patch1 to ensure the existing early exit from early_cpu_init() has INFO severity as well.

Original cover letter:

Under certain conditions a CPU may not be able to perform microcode updates even if hardware exists to that effect. In particular:

* If Xen runs under certain hypervisors they won't allow microcode updates, and will signal this fact by reporting a microcode revision of -1.
* If the DIS_MCU_LOAD bit is set, which is expected in some baremetal clouds where the owner may not trust the tenant, then the CPU is not capable of loading new microcode.

This series adds logic so that in both of these cases we don't needlessly attempt updates that are not going to succeed. Patch summary:

Patch 1 Modifies the severity of the printk statement in
early_microcode_init() to be INFO

Patch 2 Ignores microcode facilities when the current microcode revision is -1

        (was v7/patch1)

Patch 3 Moves the MSR_ARCH_CAPS read in tsx_init() to early_cpu_init() and

        early_microcode_init()
        (was v7/patch2)

Patch 4 Adds the logic to detect microcode updates being disabled on Intel.

        (was v7/patch3)

Alejandro Vallejo (4):
x86/microcode: WARN->INFO for the "no ucode loading" log message x86/microcode: Ignore microcode loading interface for revision = -1
x86: Read MSR_ARCH_CAPS immediately after early_microcode_init() x86/microcode: Disable microcode update handler if DIS_MCU_UPDATE is
set

 xen/arch/x86/cpu/common.c             | 20 ++++++++++----
 xen/arch/x86/cpu/microcode/core.c     | 40 +++++++++++++++++++++++----
 xen/arch/x86/cpu/microcode/intel.c    | 13 +++++++++
 xen/arch/x86/cpu/microcode/private.h  |  7 +++++
 xen/arch/x86/include/asm/cpufeature.h |  1 +
 xen/arch/x86/include/asm/msr-index.h  |  5 ++++
 xen/arch/x86/include/asm/setup.h      |  2 +-
 xen/arch/x86/setup.c                  |  2 +-
 xen/arch/x86/tsx.c                    | 16 +++--------
 9 files changed, 82 insertions(+), 24 deletions(-)
Signature · 1 line
2.34.1