xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 2/5] x86/ucode: Abort parallel load early on any control thread error
Date: Mon, 27 Oct 2025 22:46:13 +0000	[thread overview]
Message-ID: <eb1b8e4b-aaba-4615-bc0f-6ad908732e89@citrix.com> (raw)
In-Reply-To: <b62ae9fd-01db-43df-9966-98d028ca24e1@suse.com>

On 23/10/2025 7:24 am, Jan Beulich wrote:
> On 22.10.2025 21:28, Andrew Cooper wrote:
>> On 20/10/2025 4:55 pm, Jan Beulich wrote:
>>> On 20.10.2025 15:19, Andrew Cooper wrote:
>>>> EIO is not the only error that ucode_ops.apply_microcode() can produce.
>>>> EINVAL, EEXISTS and ENXIO can be generated too, each of which mean that Xen is
>>>> unhappy in some way with the proposed blob.
>>> Yes, yet wasn't that the case already when the EIO check was added? Were we
>>> perhaps trying to deal with a certain level of asymmetry in the system? I
>>> think a little more is needed here, also to ...
>>>
>>>> Some of these can be bypassed with --force, which will cause the parallel load
>>>> to be attempted.
>>>>
>>>> Fixes: 5ed12565aa32 ("microcode: rendezvous CPUs in NMI handler and load ucode")
>>> ... justify there being a Fixes: tag. It would also seem possible that the
>>> check was intentional and correct at the time of introduction, but was
>>> rendered stale by some later change.
>> The parallel load logic more bugs than lines of code.  What hasn't
>> already been rewritten either has pending patches, or pending bugs
>> needing fixing.
>>
>> I didn't care to check why it was limited to EIO at the time.  It's
>> definitely wrong.
>>
>> But if you insist that I waste time doing so, at the time EIO was
>> introduced, both apply_microcode()'s could fail with -ENOENT for a NULL
>> pointer, -EINVAL for "patch isn't for this CPU".
> The latter fits my "trying to deal with a certain level of asymmetry" guess,
> doesn't it?

If you mean CPU asymmetry, I'm going to argue this as a bugfix.  Some
Intel CPUs are known not to check the stepping, accept the wrong
microcode, and crash.  I have more patches to at least make this case
very obvious, but I need to get through some of the existing queue first.

If you mean revision asymmetry, nothing has really changed here.  The
parallel load is only started if a blob newer than the cache is found. 
If --force is used to override this check and load anyway, you also
won't get -EEXISTs out of apply_microcode().

> And btw, why are you being so negative again? "Waste time" is a pretty clear
> sign of you (once again) thinking that your view of the world is the only
> possibly sensible one.

I have rewritten most of microcode loading from scratch.  What hasn't
yet been rewritten is pending, with serious errors already identified
on-list and more still that haven't made it into public.

I would be further through if it had not taken an unreasonable amount of
effort to make the changes so far.  You refused my module changes
despite the blatant issues in the existing code, forcing me to
manoeuvrer them in via the boot_info changes (and in so doing discover
that module handling in general was even more broken than originally
realised).

The current pending series is in part stuck because I haven't had the
energy to tell you to stop trying to scope creep the work.

So yes, I was irritated at being asked to justify not breaking a thing
which has been thoroughly demonstrated to be broken.

>
> Nevertheless, considering that asymmetry is not something we really mean to
> care about:
>
> Acked-by: Jan Beulich <jbeulich@suse.com>

Thanks.

~Andrew


  reply	other threads:[~2025-10-27 22:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20 13:19 [PATCH for-4.21? 0/5] x86/ucode: Support loading latest ucode from linux-firwmare Andrew Cooper
2025-10-20 13:19 ` [PATCH 1/5] x86/ucode: Fix missing printk() newline in ucode_probe_amd() Andrew Cooper
2025-10-20 13:37   ` Jan Beulich
2025-10-20 15:02     ` Andrew Cooper
2025-10-20 13:19 ` [PATCH 2/5] x86/ucode: Abort parallel load early on any control thread error Andrew Cooper
2025-10-20 15:55   ` Jan Beulich
2025-10-22 19:28     ` Andrew Cooper
2025-10-23  6:24       ` Jan Beulich
2025-10-27 22:46         ` Andrew Cooper [this message]
2025-10-28  8:07           ` Jan Beulich
2025-10-20 13:19 ` [PATCH 3/5] x86/ucode: Refine TLB flush fix for AMD Fam17h CPUs Andrew Cooper
2025-10-21  8:34   ` Jan Beulich
2025-10-20 13:19 ` [PATCH 4/5] x86/ucode: Cross check the minimum revision Andrew Cooper
2025-10-21  9:18   ` Jan Beulich
2025-10-21  9:24     ` Andrew Cooper
2025-10-20 13:19 ` [PATCH 5/5] x86/ucode: Relax digest check when Entrysign is fixed in firmware Andrew Cooper
2025-10-20 15:06   ` Andrew Cooper
2025-10-21  9:47   ` Jan Beulich
2025-10-22 21:19     ` Andrew Cooper
2025-10-23  7:05       ` Jan Beulich
2025-10-27 21:42         ` Andrew Cooper

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=eb1b8e4b-aaba-4615-bc0f-6ad908732e89@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.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 NNTP newsgroup(s).