The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Srinivas Eeda <srinivas.eeda@oracle.com>
Subject: Re: [PATCH] x86/microcode: Remove useless code after early microcode support added
Date: Tue, 2 Apr 2019 17:35:24 +0200	[thread overview]
Message-ID: <20190402153524.GH6826@zn.tnic> (raw)
In-Reply-To: <1554108412-22229-1-git-send-email-zhenzhong.duan@oracle.com>

On Mon, Apr 01, 2019 at 04:46:52PM +0800, Zhenzhong Duan wrote:
> After early microcode update was added, microcode couldn't be configured

No, early loading doesn't have anything to do with it - the driver was
made built-in only.

> as a module, microcode update happens at early bootup and cpu hotplug
> stage. This made the microcode update code in module loading stage
> useless.
> 
> This patch

Avoid having "This patch" or "This commit" in the commit message. It is
tautologically useless.

Also, do

$ git grep 'This patch' Documentation/process

for more details.

> remove the useless code.

Well, not useless.

1. Apply your patch, boot kernel without an initrd so that it doesn't
apply early microcode.

2. Load late microcode:

# echo 1 > /sys/devices/system/cpu/microcode/reload
[   66.430052] microcode: CPU0: new patch_level=0x05000029
[   66.430352] x86/CPU: CPU features have changed after loading microcode, but might not take effect.
[   66.430620] microcode: Reload completed, microcode revision: 0x5000029

3.
# grep microcode /proc/cpuinfo
microcode       : 0x5000029
microcode       : 0x5000028	<--- !!!

Whoops. CPU1 didn't get updated.

So I'd suggest leaving this code alone and concentrating on fixing real
bugs. Unless it is causing other issues.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

  reply	other threads:[~2019-04-02 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01  8:46 [PATCH] x86/microcode: Remove useless code after early microcode support added Zhenzhong Duan
2019-04-02 15:35 ` Borislav Petkov [this message]
     [not found]   ` <4c12556d-9663-5cc9-bf0a-b2032110b0cb@oracle.com>
2019-04-03  8:18     ` Borislav Petkov

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=20190402153524.GH6826@zn.tnic \
    --to=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=srinivas.eeda@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=zhenzhong.duan@oracle.com \
    /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