[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.18] x86/ucode: Abort parallel load early on any control thread error



commit f0fcf6979f3f88a19b9aa9b11aa98feec7430256
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Oct 17 17:59:49 2025 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Oct 28 18:18:20 2025 +0000

    x86/ucode: Abort parallel load early on any control thread error
    
    EIO is not the only error that ucode_ops.apply_microcode() can produce.
    EINVAL, EEXISTS and ENXIO can be generated too, each of which mean that Xen 
is
    unhappy in some way with the proposed blob.
    
    Some of these can be bypassed with --force, which will cause the parallel 
load
    to be attempted.
    
    Fixes: 5ed12565aa32 ("microcode: rendezvous CPUs in NMI handler and load 
ucode")
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
    (cherry picked from commit e0bb712a28a93e5acd8b0ea5e7336a92d42bb740)
    [Note: --force doesn't exist in this version of Xen]
---
 xen/arch/x86/cpu/microcode/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/microcode/core.c 
b/xen/arch/x86/cpu/microcode/core.c
index c0cafb29a0..0e776264f3 100644
--- a/xen/arch/x86/cpu/microcode/core.c
+++ b/xen/arch/x86/cpu/microcode/core.c
@@ -503,10 +503,10 @@ static int control_thread_fn(const struct microcode_patch 
*patch)
         atomic_inc(&cpu_updated);
     atomic_inc(&cpu_out);
 
-    if ( ret == -EIO )
+    if ( ret )
     {
         printk(XENLOG_ERR
-               "Late loading aborted: CPU%u failed to update ucode\n", cpu);
+               "Late loading aborted: CPU%u failed to update ucode: %d\n", 
cpu, ret);
         goto out;
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.