WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] x86/ucode-amd: fix regression from c/s 23871:503

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86/ucode-amd: fix regression from c/s 23871:503ee25
From: "Charles Arnold" <carnold@xxxxxxxx>
Date: Tue, 25 Oct 2011 08:26:17 -0600
Cc: "keir@xxxxxxx" <keir@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
Delivery-date: Tue, 25 Oct 2011 10:20:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 21/10/2011 09:37, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

> 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>
> 
> --- a/xen/arch/x86/microcode_amd.c
> +++ b/xen/arch/x86/microcode_amd.c
> @@ -76,14 +76,6 @@ static int microcode_fits(void *mc, int 
>      /* 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 @@ static int microcode_fits(void *mc, int 
>      }
>  
>      if ( !equiv_cpu_id )
> -           return 0;
> +        return 0;
>  
>      if ( (mc_header->processor_rev_id) != equiv_cpu_id )
>      {
> @@ -113,8 +105,7 @@ static int microcode_fits(void *mc, int 
>             "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 @@ static int cpu_request_microcode(int cpu
>      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);
> 

Our internal testing confirms that this patch fixes the boot problem.  
Comment from Bugzilla states,
"Both affected systems (with most recent microcode_ctl-1.17-102.38.1 installed
and insserv'ed) are now booting well."

- Charles



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

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH] x86/ucode-amd: fix regression from c/s 23871:503ee25, Charles Arnold <=