[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Freeze exception request: x86 microcode support for Wheezy



On Mon, 30 Jul 2012, Henrique de Moraes Holschuh wrote:
> On Mon, 30 Jul 2012, Philipp Kern wrote:
> > On Sat, Jul 21, 2012 at 12:56:11PM -0300, Henrique de Moraes Holschuh wrote:
> > > This email is related to bug #681352 (amd64-microcode), and to an
> > > yet-unfilled freeze exception request for intel-microcode.
> > 
> > Just looking at amd64-microcode:
> > 
> > The initramfs hook does not specify "set -e". Should it?
> 
> No, it could cause problems.  I do use "|| true" to explicitly mark where
> errors are expected and _must_ be ignored, but that doesn't imply it should
> be "set -e" :-)
> 
> > Which kernels are broken so that they need the per-CPU workaround?
> 
> AFAIK, all currently published but 3.6-rc1.   There are three ABIs:
> 
> 1. broken per-core (allows partial update)

Just to make sure I'm being clear: it is "broken" because the ABI allows the
user to issue a reload command to just a subset of the cores of a processor.
This results in an schizophrenic processor with mismatched microcode among
its cores.  It *does* work (otherwise it would be dangerous to apply the
microcode update to a running system in the first place), but you're not
supposed to run it like that.

So, the per-cpu thing is not a workaround, it is how the ABI wanted it done.
This per-core broken-as-designed ABI has been killed in Linux v3.6.

> 2. fixed per-core  (errors in every core but the BSP, and updates every core
> at once) -- should be in -stable soon enough.

The "fixed per-core ABI" makes the kernel refuse the reload command on every
core but the BSP, and changes the behaviour of a reload command to the BSP
to "reload every core".  The BSP was chosen, because that's the one core you
are not allowed to offline.

The initramfs script (and the postinst scripts) in amd64-microcode and
intel-microcode will trigger a reload on all cores, and will not stop on
errors.  This takes care of both cases above (and I tested it, by
backporting the kernel fix and testing both cases on a 8-way SMP box that
requires a microcode update).

That said, during boot these sysfs interfaces are only used when running a
custom-built kernel with a built-in microcode driver.  The Debian kernel
doesn't need it, as a system-wide reload is triggered when the microcode
module is loaded by the initramfs.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Reply to: