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

[Xen-devel] [PATCH] Propagate microcode update errors

From: Uwe Dannowski <uwed@xxxxxxxxx>

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@xxxxxxxxx>
Reviewed-by: Stefan Nuernberger <snu@xxxxxxxxx>
Reviewed-by: Martin Pohlack <mpohlack@xxxxxxxxx>
CC: David Woodhouse <dwmw@xxxxxxxxxxxx>
CC: Amit Shah <aams@xxxxxxxxx>
CC: Jan Beulich <jbeulich@xxxxxxxx>
CC: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
 xen/arch/x86/microcode_intel.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/microcode_intel.c b/xen/arch/x86/microcode_intel.c
index c6b67e4..a9b0ff9 100644
--- a/xen/arch/x86/microcode_intel.c
+++ b/xen/arch/x86/microcode_intel.c
@@ -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]);
+                "0x%x to 0x%x failed. Resulting revision is 0x%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;

Xen-devel mailing list



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