All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ashok Raj <ashok.raj@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	Ashok Raj <ashok.raj@intel.com>
Subject: Re: [PATCH 2/2] x86/microcode: Rework early revisions reporting
Date: Fri, 1 Dec 2023 13:32:37 -0800	[thread overview]
Message-ID: <ZWpQ9Wbb7u4ss0mt@a4bf019067fa.jf.intel.com> (raw)
In-Reply-To: <20231201204146.GGZWpFCqodLUPS27tJ@fat_crate.local>

On Fri, Dec 01, 2023 at 09:41:46PM +0100, Borislav Petkov wrote:
> On Fri, Dec 01, 2023 at 12:33:34PM -0800, Ashok Raj wrote:
> > I'll get a dmesg shortly once i get my test system back.
> 
> Thanks.
> 

dmesg for the microcode part here below:

https://paste.debian.net/hidden/e911dffc/

> > What I meant was 
> 
> I know what you meant. Did you see the diff I sent you?
> 
> It has the fix already:
> 
> @@ -410,13 +421,19 @@ void __init load_ucode_intel_bsp(struct early_load_data *ed)
>  {
>         struct ucode_cpu_info uci;
> 
> -       ed->old_rev = intel_get_microcode_revision();
> -
>         uci.mc = get_microcode_blob(&uci, false);
> -       if (uci.mc && apply_microcode_early(&uci) == UCODE_UPDATED)
> +       ed->old_rev = uci.cpu_sig.rev;
> +
> +       uc_dbg("old_rev: 0x%x", ed->old_rev);
> +
> +       if (uci.mc && apply_microcode_early(&uci) == UCODE_UPDATED) {
>                 ucode_patch_va = UCODE_BSP_LOADED;
> +               ed->new_rev = uci.cpu_sig.rev;
> +
> +               uc_dbg("updated, new_rev: 0x%x", ed->new_rev);
> +       }
> ^^^^^^^^^^^^^
> 
> The assignment is now inside the UCODE_UPDATED conditional.

The first patch I tried was exactly this, but assumed having the fix  in
core.c would help both AMD/Intel.

Assuming if the same loaded patch was also present in initrd, 

load_ucode_amd_bsp()
   early_apply_microcode()
      __apply_microcode_amd()

old_rev will still be non-zero. 

  reply	other threads:[~2023-12-01 21:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15 21:02 [PATCH 0/2] x86/microcode: Unify early reporting Borislav Petkov
2023-11-15 21:02 ` [PATCH 1/2] x86/microcode: Remove the driver announcement and version Borislav Petkov
2023-11-21 15:42   ` [tip: x86/urgent] " tip-bot2 for Borislav Petkov (AMD)
2023-11-15 21:02 ` [PATCH 2/2] x86/microcode: Rework early revisions reporting Borislav Petkov
2023-11-30 18:34   ` Ashok Raj
2023-12-01 16:39     ` Borislav Petkov
2023-12-01 20:33       ` Ashok Raj
2023-12-01 20:41         ` Borislav Petkov
2023-12-01 21:32           ` Ashok Raj [this message]
2023-12-02 16:38             ` Borislav Petkov
2023-12-02 23:35               ` Ashok Raj
2023-12-03 11:15     ` [tip: x86/microcode] x86/microcode/intel: Set new revision only after a successful update tip-bot2 for Borislav Petkov (AMD)
2023-11-30 18:46   ` [PATCH 2/2] x86/microcode: Rework early revisions reporting Ashok Raj
2023-12-01 18:37     ` [tip: x86/microcode] x86/microcode/intel: Remove redundant microcode late updated message tip-bot2 for Ashok Raj
2023-11-21 15:05 ` [PATCH 0/2] x86/microcode: Unify early reporting Thomas Gleixner

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=ZWpQ9Wbb7u4ss0mt@a4bf019067fa.jf.intel.com \
    --to=ashok.raj@intel.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.