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 0/3] x86/microcode: support for microcode update

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 0/3] x86/microcode: support for microcode update in Xen dom0
From: Ben Guthro <ben@xxxxxxxxxx>
Date: Thu, 3 Nov 2011 11:06:56 -0400
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Tigran Aivazian <tigran@xxxxxxxxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>
Delivery-date: Thu, 03 Nov 2011 08:13:22 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9GTkc+l/fsIJ3ETQeN7G9BJQbqFNL2JyuqTtXpt1LRo=; b=STrRicF0VaWqIoqdVYtsPNS65ORpI+QsOec0aeo06D8LQvf6RmZdwauqGxE18Onvqg V9YfwcAXQUvkDBa/AvP1RXKinA1U5jT3UzU/X4GpGH2atabPUsZtTFOEh4Z88XXfnAhL tpKjdbQKdAxR5JEDRhlYSmY6DepQ9/NVQAirQ=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <cover.1317060617.git.jeremy.fitzhardinge@xxxxxxxxxx>
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>
References: <cover.1317060617.git.jeremy.fitzhardinge@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
After pulling in this change from your tree, I found the following bug, when checking an enum value, which should be considered before inclusion:


diff --git a/arch/x86/kernel/microcode_xen.c b/arch/x86/kernel/microcode_xen.c
index 9d2a06b..6a73957 100644
--- a/arch/x86/kernel/microcode_xen.c
+++ b/arch/x86/kernel/microcode_xen.c
@@ -157,7 +157,7 @@ static enum ucode_state xen_request_microcode_user(int cpu,
  ret = UCODE_OK;
 
 out:
- if (ret == 0)
+ if (ret == UCODE_OK)
  uci->mc = uc;
  else
  vfree(uc);



On Mon, Sep 26, 2011 at 2:17 PM, Jeremy Fitzhardinge <jeremy@xxxxxxxx> wrote:
From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>

Hi all,

I'm proposing this for the next merge window v3.2.

I originally posted this early this year, and it prompted a debate
about what the "proper" way that Linux should do microcode updates,
with the general concensus being "earlier", ideally in the bootloader
(or in the case of Xen, as the hypervisor boots before starting any
domains).  However, as far as I know there has been no progress along
those lines.

I would like to therefore merge this so that a Linux kernel booting as
dom0 under Xen can update the microcode in the same manner as a kernel
booting natively.  When we work out how boot-time microcode updates
can be done, then we'll look at modifying Xen accordingly.  In the
meantime, we should have a functional parity.

The only change to this code from the previous posting is some patch
restructuring so that regardless of how the platform.h ABI header gets
merged (since there are some other pending branches containing it), it
will be identical and cause no merge headaches.

>From original posting:

This series adds a new "Xen" microcode update type, in addition to
Intel and AMD.

The Xen hypervisor is responsible for performing the actual microcode
update (since only it knows what physical CPUs are in the system and
has sufficient privilege to access them), but it requires the dom0
kernel to provide the actual microcode update data.

Xen update mechanism is uniform independent of the CPU type, but the
driver must know where to find the data file, which depends on the CPU
type.  And since the update hypercall updates all CPUs, we only need
to execute it once on any CPU - but for simplicity it just runs it only
on (V)CPU 0.

Thanks,
       J

Jeremy Fitzhardinge (2):
 xen: add dom0_op hypercall
 xen: add CPU microcode update driver

Yu Ke (1):
 xen/acpi: Domain0 acpi parser related platform hypercall

 arch/ia64/include/asm/xen/interface.h |    1 +
 arch/x86/include/asm/microcode.h      |    9 +
 arch/x86/include/asm/xen/hypercall.h  |    8 +
 arch/x86/include/asm/xen/interface.h  |    1 +
 arch/x86/kernel/Makefile              |    1 +
 arch/x86/kernel/microcode_core.c      |    5 +-
 arch/x86/kernel/microcode_xen.c       |  198 ++++++++++++++++++++
 arch/x86/xen/Kconfig                  |    4 +
 include/xen/interface/platform.h      |  320 +++++++++++++++++++++++++++++++++
 include/xen/interface/xen.h           |    1 +
 10 files changed, 547 insertions(+), 1 deletions(-)
 create mode 100644 arch/x86/kernel/microcode_xen.c
 create mode 100644 include/xen/interface/platform.h

--
1.7.6.2


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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>