From: Uwe Dannowski <u...@amazon.de>

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 <u...@amazon.de>
Reviewed-by: Stefan Nuernberger <s...@amazon.de>
Reviewed-by: Martin Pohlack <mpohl...@amazon.de>
CC: David Woodhouse <d...@amazon.co.uk>
CC: Amit Shah <a...@amazon.de>
CC: Jan Beulich <jbeul...@suse.com>
CC: Andrew Cooper <andrew.coop...@citrix.com>
---
 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;
 }
-- 
2.7.3.AMZN


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to