public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Alexander Hirsch <1zeeky@gmail.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] x86/microcode: Allow early loading without initrd
Date: Sun, 26 Apr 2015 18:16:09 +0200	[thread overview]
Message-ID: <20150426161609.GA4053@pd.tnic> (raw)
In-Reply-To: <20150426170314.210e921c@netblarch.fritz.box>

On Sun, Apr 26, 2015 at 05:03:14PM +0200, Alexander Hirsch wrote:
> Microcode can be baked into the kernel image via CONFIG_EXTRA_FIRMWARE
> and the early loader supports that, but still depended on
> BLK_DEV_INITRD.
> This dependency is removed.

Yeah, it is removed but it adds a bunch of ugly ifdeffery which makes
the code even more unreadable than it is :-\

> Signed-off-by: Alexander Hirsch <1zeeky@gmail.com>
> ---
>
> This patch depends on the "Parse built-in microcode early" patch by
> Borislav Petkov (https://lkml.org/lkml/2015/4/1/331).

In the future, please CC me on microcode loader patches.

> I only tested this on two Intel machines (an i3 M330 and an i5-4690).
> There is no change in amd_early.c because it compiles fine - only
> intel_early.c complained without BLK_DEV_INITRD.

Right, so I see what you're trying to achieve and I'd guess your
reasoning is that BLK_DEV_INITRD is not really needed if you build your
microcode into the kernel. And that's ok but I'm not persuaded yet:

* why do you even bother - BLK_DEV_INITRD gets enabled on all distro
kernels and almost everything running Linux so why bother? Or do you
have a special use case which doesn't want BLK_DEV_INITRD. I'd be
interested to hear about it.

* the early loader was done with initrd in mind and it was/still is its
main source for microcode blobs early in the boot. So if we want to
make it not-mandatory, then the driver needs to be reorganized so that
builtin blobs and initrd blobs loading paths are cleanly untangled. The
ifdeffery thing might work now but is certainly not future-proof so it
would need to be designed in a cleaner way.

Perhaps something like a microcode cache of patches the AMD loader has,
all decoupled from the loading paths or so... I don't have a good idea
right now. I'll have to think about it.

Thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

  parent reply	other threads:[~2015-04-26 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-26 15:03 [PATCH] x86/microcode: Allow early loading without initrd Alexander Hirsch
2015-04-26 15:31 ` Paul Bolle
2015-04-26 16:37   ` Alexander Hirsch
2015-04-26 16:16 ` Borislav Petkov [this message]
2015-04-26 17:27   ` Alexander Hirsch
2015-04-27  9:23     ` Borislav Petkov
2015-04-30 13:18   ` Henrique de Moraes Holschuh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150426161609.GA4053@pd.tnic \
    --to=bp@alien8.de \
    --cc=1zeeky@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox