]> xenbits.xensource.com Git - xen.git/commit
x86/ucode: Further fixes to identify "ucode already up to date"
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 16 May 2024 11:09:39 +0000 (12:09 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 16 May 2024 12:59:11 +0000 (13:59 +0100)
commit977d98e67c2e929c62aa1f495fc4c6341c45abb5
treed5e839b393a3013906ec919026c32887864adef1
parentae7584f63678cd9adc1c2f3a1e813b67a6b24544
x86/ucode: Further fixes to identify "ucode already up to date"

When the revision in hardware is newer than anything Xen has to hand,
'microcode_cache' isn't set up.  Then, `xen-ucode` initiates the update
because it doesn't know whether the revisions across the system are symmetric
or not.  This involves the patch getting all the way into the
apply_microcode() hooks before being found to be too old.

This is all a giant mess and needs an overhaul, but in the short term simply
adjust the apply_microcode() to return -EEXIST.

Also, unconditionally print the preexisting microcode revision on boot.  It's
relevant information which is otherwise unavailable if Xen doesn't find new
microcode to use.

Fixes: 648db37a155a ("x86/ucode: Distinguish "ucode already up to date"")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/cpu/microcode/amd.c
xen/arch/x86/cpu/microcode/core.c
xen/arch/x86/cpu/microcode/intel.c