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

[Xen-changelog] [xen-unstable] x86/ucode-amd: fix regression from c/s 23871:503ee256fecf



# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1319475620 -3600
# Node ID e458dfc35b8d3be04a9b72c30ff97163e27a7314
# Parent  ffe861c1d5dfa8f4485052e5600e06124105033f
x86/ucode-amd: fix regression from c/s 23871:503ee256fecf

microcode_fits() must return distinct values for the success and
no-fit-but-no-error cases, so the caller can react accordingly. Make
it return 1 in the success case, and adjust its single caller.

Also remove an impossible code path - install_equiv_cpu_table(), which
gets called prior to microcode_fits(), never leaves equiv_cpu_table
being NULL without also returning an error.

Note that this is still awaiting testing on a system where the
regression was actually observed (which also requires a new enough
microcode_ctl package). Note also that this will need to be
backported to 4.0 and 4.1 (or the broken c/s that got backported
there reverted).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Committed-by: Keir Fraser <keir@xxxxxxx>
---


diff -r ffe861c1d5df -r e458dfc35b8d xen/arch/x86/microcode_amd.c
--- a/xen/arch/x86/microcode_amd.c      Mon Oct 24 11:29:08 2011 +0100
+++ b/xen/arch/x86/microcode_amd.c      Mon Oct 24 18:00:20 2011 +0100
@@ -76,14 +76,6 @@
     /* We should bind the task to the CPU */
     BUG_ON(cpu != raw_smp_processor_id());
 
-    if ( equiv_cpu_table == NULL )
-    {
-        printk(KERN_INFO "microcode: CPU%d microcode update with "
-               "version 0x%x (current=0x%x)\n",
-               cpu, mc_header->patch_id, uci->cpu_sig.rev);
-        goto out;
-    }
-
     current_cpu_id = cpuid_eax(0x00000001);
 
     for ( i = 0; equiv_cpu_table[i].installed_cpu != 0; i++ )
@@ -96,7 +88,7 @@
     }
 
     if ( !equiv_cpu_id )
-           return 0;
+        return 0;
 
     if ( (mc_header->processor_rev_id) != equiv_cpu_id )
     {
@@ -113,8 +105,7 @@
            "update with version 0x%x (current=0x%x)\n",
            cpu, mc_header->patch_id, uci->cpu_sig.rev);
 
-out:
-    return 0;
+    return 1;
 }
 
 static int apply_microcode(int cpu)
@@ -285,7 +276,7 @@
     while ( (ret = get_next_ucode_from_buffer_amd(mc, buf, size, &offset)) == 
0)
     {
         error = microcode_fits(mc, cpu);
-        if (error != 0)
+        if (error <= 0)
             continue;
 
         error = apply_microcode(cpu);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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