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-changelog

[Xen-changelog] [xen-unstable] x86 ucode: optimizing microcode update

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86 ucode: optimizing microcode update
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Jan 2009 10:00:13 -0800
Delivery-date: Thu, 22 Jan 2009 09:59:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1232622699 0
# Node ID adc3775bb6d8aa1070b8aaaa186a2a98898f9478
# Parent  a1d0868ffadf171ce9f4c61f4dc57f4d4abe4e4c
x86 ucode: optimizing microcode update

It's possible the data file has multiple matching ucode, we needn't to
update multiple times, just keep searching the latest version, and
update once.

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>
---
 xen/arch/x86/microcode_intel.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r a1d0868ffadf -r adc3775bb6d8 xen/arch/x86/microcode_intel.c
--- a/xen/arch/x86/microcode_intel.c    Thu Jan 22 11:11:10 2009 +0000
+++ b/xen/arch/x86/microcode_intel.c    Thu Jan 22 11:11:39 2009 +0000
@@ -325,6 +325,7 @@ static int cpu_request_microcode(int cpu
     long offset = 0;
     int error = 0;
     void *mc;
+    unsigned int matching_count = 0;
 
     /* We should bind the task to the CPU */
     BUG_ON(cpu != raw_smp_processor_id());
@@ -343,7 +344,7 @@ static int cpu_request_microcode(int cpu
          */
         if ( error == 1 )
         {
-            apply_microcode(cpu);
+            matching_count++;
             error = 0;
         }
         xfree(mc);
@@ -352,6 +353,9 @@ static int cpu_request_microcode(int cpu
         xfree(mc);
     if ( offset < 0 )
         error = offset;
+
+    if ( !error && matching_count )
+        apply_microcode(cpu);
 
     return error;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86 ucode: optimizing microcode update, Xen patchbot-unstable <=