]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
x86/microcode: Propagate microcode update errors
authorUwe Dannowski <uwed@amazon.de>
Fri, 16 Feb 2018 13:19:54 +0000 (13:19 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 16 Feb 2018 13:33:13 +0000 (13:33 +0000)
Errors on updating the microcode in the processor were silently
dropped when invoked via the microcode_update hypercall. Also, the log
message was misleading.

Signed-off-by: Uwe Dannowski <uwed@amazon.de>
Reviewed-by: Stefan Nuernberger <snu@amazon.de>
Reviewed-by: Martin Pohlack <mpohlack@amazon.de>
Reviewed-by: Amit Shah <aams@amazon.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/microcode_intel.c

index c6b67e4fe7cecd80000ab61f1c56822ff1a7071a..9657575c296c18a45fa9232cf909ff5940b82e50 100644 (file)
@@ -309,7 +309,8 @@ static int apply_microcode(unsigned int cpu)
     if ( val[1] != uci->mc.mc_intel->hdr.rev )
     {
         printk(KERN_ERR "microcode: CPU%d update from revision "
-               "%#x to %#x failed\n", cpu_num, uci->cpu_sig.rev, val[1]);
+               "%#x to %#x failed. Resulting revision is %#x.\n", cpu_num,
+               uci->cpu_sig.rev, uci->mc.mc_intel->hdr.rev, val[1]);
         return -EIO;
     }
     printk(KERN_INFO "microcode: CPU%d updated from revision "
@@ -387,7 +388,7 @@ static int cpu_request_microcode(unsigned int cpu, const void *buf,
         error = offset;
 
     if ( !error && matching_count )
-        apply_microcode(cpu);
+        error = apply_microcode(cpu);
 
     return error;
 }