Xen-Devel Archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Fouad Hilly" <fouad.hilly@cloud.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] x86/ucode: Further fixes to identify "ucode already up to date"
Date: Thu, 16 May 2024 13:44:48 +0200	[thread overview]
Message-ID: <7d8fa536-f196-46e8-870f-0cfb57c8a65d@suse.com> (raw)
In-Reply-To: <20240516113103.3018940-1-andrew.cooper3@citrix.com>

On 16.05.2024 13:31, Andrew Cooper wrote:
> When the revision in hardware is newer than anything Xen has to hand,
> 'microcode_cache' isn't set up.  Then, `xen-ucode` initiates the update
> because it doesn't know whether the revisions across the system are symmetric
> or not.  This involves the patch getting all the way into the
> apply_microcode() hooks before being found to be too old.
> 
> This is all a giant mess and needs an overhaul, but in the short term simply
> adjust the apply_microcode() to return -EEXIST.
> 
> Also, unconditionally print the preexisting microcode revision on boot.  It's
> relevant information which is otherwise unavailable if Xen doesn't find new
> microcode to use.

Since you do this for the BSP only, I'm okay with that. Doing this for all
CPUs would have added too much verbosity imo, and I would then have asked
to log the pre-existing revision only when no update would be done by us.

> Fixes: 648db37a155a ("x86/ucode: Distinguish "ucode already up to date"")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>
with one small request related to the remark above:

> --- a/xen/arch/x86/cpu/microcode/core.c
> +++ b/xen/arch/x86/cpu/microcode/core.c
> @@ -881,6 +881,8 @@ int __init early_microcode_init(unsigned long *module_map,
>  
>      ucode_ops.collect_cpu_info();
>  
> +    printk(XENLOG_INFO "Boot microcode revision: 0x%08x\n", this_cpu(cpu_sig).rev);

Can this please be "BSP" or "Boot CPU" instead of just "Boot", to clarify
which CPU's information this is? I'm pretty sure you too have hit systems
where firmware doesn't update all cores.

Jan


  reply	other threads:[~2024-05-16 11:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 11:31 [PATCH] x86/ucode: Further fixes to identify "ucode already up to date" Andrew Cooper
2024-05-16 11:44 ` Jan Beulich [this message]
2024-05-16 12:31   ` Andrew Cooper
2024-05-16 11:50 ` Roger Pau Monné
2024-05-16 12:30   ` Andrew Cooper
2024-05-16 12:45     ` Roger Pau Monné

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=7d8fa536-f196-46e8-870f-0cfb57c8a65d@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=fouad.hilly@cloud.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.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 read-only IMAP folder(s) and NNTP newsgroup(s).