From: Borislav Petkov <bp@alien8.de>
To: "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>
Cc: Jacob Shin <jacob.shin@amd.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org, Fenghua Yu <fenghua.yu@intel.com>,
Andreas Herrmann <herrmann.der.user@googlemail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 3/3] x86/microcode: early microcode patch loading support on AMD
Date: Tue, 28 May 2013 10:13:09 +0200 [thread overview]
Message-ID: <20130528081309.GA29233@pd.tnic> (raw)
In-Reply-To: <1369323618-5820-4-git-send-email-jacob.shin@amd.com>
On Thu, May 23, 2013 at 10:40:18AM -0500, Jacob Shin wrote:
> Add support for early microcode patch loading on AMD.
>
> Signed-off-by: Jacob Shin <jacob.shin@amd.com>
> ---
> arch/x86/Kconfig | 16 +-
> arch/x86/include/asm/microcode.h | 1 -
> arch/x86/include/asm/microcode_amd.h | 17 ++
> arch/x86/include/asm/microcode_intel.h | 1 +
> arch/x86/kernel/microcode_amd.c | 338 ++++++++++++++++++++++++++++----
> arch/x86/kernel/microcode_core_early.c | 7 +
> 6 files changed, 333 insertions(+), 47 deletions(-)
> create mode 100644 arch/x86/include/asm/microcode_amd.h
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 3a5bced..fab72e7 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1090,8 +1090,18 @@ config MICROCODE_INTEL_LIB
> depends on MICROCODE_INTEL
>
> config MICROCODE_INTEL_EARLY
> - bool "Early load microcode"
> + def_bool n
> depends on MICROCODE_INTEL && BLK_DEV_INITRD
> +
> +config MICROCODE_AMD_EARLY
> + def_bool n
> + depends on MICROCODE_AMD && BLK_DEV_INITRD
> +
> +config MICROCODE_EARLY
> + bool "Early load microcode"
> + depends on (MICROCODE_INTEL || MICROCODE_AMD) && BLK_DEV_INITRD
> + select MICROCODE_INTEL_EARLY if MICROCODE_INTEL
> + select MICROCODE_AMD_EARLY if MICROCODE_AMD
> default y
> help
> This option provides functionality to read additional microcode data
This whole microcode Kconfig game seems kinda too granulary to me.
I mean, distros will enable all of them anyway (both AMD and Intel
microcode loading) and since we can safely enable early loading even if
there's no microcode in the initrd, we can add in the early code too.
So how about simplifying this a lot by having only:
config MICROCODE
tristate "CPU microcode loading support"
select FW_LOADER
config MICROCODE_EARLY
depends on BLK_DEV_INITRD && MICROCODE
and drop all this vendor differentiation. Microcode core code checks
vendors so it won't be loaded on anything unsupported, etc.
hpa, Ingo, what do you guys think?
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-05-28 8:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 15:40 [PATCH V2 0/3] x86/microcode: early microcode patch loading support on AMD Jacob Shin
2013-05-23 15:40 ` [PATCH V2 1/3] x86/microcode: vendor abstract out save_microcode_in_initrd() Jacob Shin
2013-05-28 14:28 ` Borislav Petkov
2013-05-23 15:40 ` [PATCH V2 2/3] x86, microcode, intel: Correct typo in printk Jacob Shin
2013-05-23 18:12 ` Joe Perches
2013-05-24 8:43 ` Borislav Petkov
2013-05-24 14:11 ` Jacob Shin
2013-05-23 15:40 ` [PATCH V2 3/3] x86/microcode: early microcode patch loading support on AMD Jacob Shin
2013-05-24 15:33 ` Yu, Fenghua
2013-05-24 19:50 ` Jacob Shin
2013-05-28 8:13 ` Borislav Petkov [this message]
2013-05-28 22:45 ` Borislav Petkov
2013-05-28 23:43 ` Jacob Shin
2013-05-29 11:06 ` Borislav Petkov
2013-05-23 21:01 ` [PATCH V2 0/3] " Yu, Fenghua
2013-05-23 21:23 ` Jacob Shin
2013-05-24 8:29 ` Borislav Petkov
2013-05-24 14:12 ` Jacob Shin
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=20130528081309.GA29233@pd.tnic \
--to=bp@alien8.de \
--cc=fenghua.yu@intel.com \
--cc=herrmann.der.user@googlemail.com \
--cc=hpa@zytor.com \
--cc=jacob.shin@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).