xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Scan initramfs for microcode cpio archive. (v2)
@ 2013-07-18 16:36 Konrad Rzeszutek Wilk
  2013-07-18 16:36 ` [PATCH v2] microcode: Scan the initramfs payload for microcode blob Konrad Rzeszutek Wilk
  2013-07-19  3:59 ` Scan initramfs for microcode cpio archive. (v2) Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-07-18 16:36 UTC (permalink / raw)
  To: JBeulich, xen-devel, david.vrabel

Greetings,

Please see the following patch which implements a mechanism to scan
the initramfs for the format of an microcode files. This is a feature
that the Linux kernel has since v3.10 - where it searches in the
initramfs for an archive of the microcode blob. The format is documented
in the Linux tree and the commit description contains it.

The tool to make this work is the initramfs creator. The one tool
'dracut' has support for this via the '--early-microcode' parameter.
(See http://news.gmane.org/gmane.linux.kernel.initramfs for dracut 030
announcement))

That, along with this patch, allows the Xen hypervisor to update the
microcode during bootup. Please review attached patch.

I had also tested just using Linux how well it deals with an initramfs
composed of two cpio images. Testing revealed that it worked great
even if the kernel did not have the early cpio support build in.
David Vrabel pointed out that it b/c:
"The kernel unpacks all cpio archives it finds in the initramfs image so
the kernel doesn't have to be aware of the way tools have packed the
filesystem into different cpio archive."

The way to use this is by the 'ucode' parameter. It has now two meanings:
  <index>,initrd

Which can be used together. By default this auto scanning is turned off
as Jan pointed out that: "Xen otoh has to be careful not to
mis-interpret a blob passed to a non-Linux Dom0 as a CPIO. How
good the guarding against this is in the code I'll have to check".

The author would like to have this on by default but that can wait
till a later time when maintainer is comfortable with this being
on by default.

 docs/misc/xen-command-line.markdown |   14 ++-
 xen/arch/x86/microcode.c            |  179 +++++++++++++++++++++++++++++++----
 xen/common/Makefile                 |    2 +-
 xen/common/earlycpio.c              |  151 +++++++++++++++++++++++++++++
 xen/include/xen/earlycpio.h         |   15 +++
 5 files changed, 340 insertions(+), 21 deletions(-)

Konrad Rzeszutek Wilk (1):
      microcode: Scan the initramfs payload for microcode blob.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-08  7:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 16:36 Scan initramfs for microcode cpio archive. (v2) Konrad Rzeszutek Wilk
2013-07-18 16:36 ` [PATCH v2] microcode: Scan the initramfs payload for microcode blob Konrad Rzeszutek Wilk
2013-08-07 14:09   ` Jan Beulich
2013-08-08  0:50     ` Konrad Rzeszutek Wilk
2013-08-08  7:07       ` Jan Beulich
2013-07-19  3:59 ` Scan initramfs for microcode cpio archive. (v2) Konrad Rzeszutek Wilk
2013-07-19  3:59   ` [PATCH] microcode: Check whether the microcode is correct Konrad Rzeszutek Wilk
2013-08-07 14:17     ` Jan Beulich
2013-08-08  0:50       ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).