2011-11-28 20:34:40 +01:00
|
|
|
References: bnc#725169
|
|
|
|
|
2011-10-28 17:40:38 +02:00
|
|
|
# HG changeset patch
|
|
|
|
# User Jan Beulich <jbeulich@novell.com>
|
|
|
|
# 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@novell.com>
|
|
|
|
Committed-by: Keir Fraser <keir@xen.org>
|
|
|
|
|
2012-08-10 23:38:41 +02:00
|
|
|
Index: xen-4.1.3-testing/xen/arch/x86/microcode_amd.c
|
2011-10-28 17:40:38 +02:00
|
|
|
===================================================================
|
2012-08-10 23:38:41 +02:00
|
|
|
--- xen-4.1.3-testing.orig/xen/arch/x86/microcode_amd.c
|
|
|
|
+++ xen-4.1.3-testing/xen/arch/x86/microcode_amd.c
|
|
|
|
@@ -76,14 +76,6 @@ static int microcode_fits(const struct m
|
2011-10-28 17:40:38 +02:00
|
|
|
/* 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++ )
|
2012-08-10 23:38:41 +02:00
|
|
|
@@ -117,7 +109,6 @@ static int microcode_fits(const struct m
|
2011-10-28 17:40:38 +02:00
|
|
|
"update with version 0x%x (current=0x%x)\n",
|
|
|
|
cpu, mc_header->patch_id, uci->cpu_sig.rev);
|
|
|
|
|
|
|
|
-out:
|
2012-08-10 23:38:41 +02:00
|
|
|
return 1;
|
2011-10-28 17:40:38 +02:00
|
|
|
}
|
|
|
|
|