[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/ucode/AMD: apply the patch early on every logical thread
On Thu, Jan 5, 2023 at 10:56 PM Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx> wrote: > > diff --git a/xen/arch/x86/cpu/microcode/private.h > > b/xen/arch/x86/cpu/microcode/private.h > > index 73b095d5bf..c4c6729f56 100644 > > --- a/xen/arch/x86/cpu/microcode/private.h > > +++ b/xen/arch/x86/cpu/microcode/private.h > > @@ -7,6 +7,7 @@ extern bool opt_ucode_allow_same; > > > > enum microcode_match_result { > > OLD_UCODE, /* signature matched, but revision id is older or equal */ > > + SAME_UCODE, /* signature matched, but revision id is the same */ > > NEW_UCODE, /* signature matched, but revision id is newer */ > > MIS_UCODE, /* signature mismatched */ > > }; > > I don't think this is a clever idea. For one, OLD and SAME are now > ambiguous (at least as far as the comments go), and having the > difference between the two depend on allow_same is unexpected to say the > least. Sorry I missed that "equal" comment which is easily removable. What I don't follow is your concern about allow_same. It's already changing if OLD/NEW is returned and my patch makes it SAME/NEW. > I never really liked the enum to begin with, and I think the logic would > be cleaner without it. > > > We depend entirely on there being one ucode blob which is applicable > globally across the system, so MIS_UCODE can be expressed as returning > NULL from the initial searches. Everything else can then be expressed > in a normal {mem,str}cmp() way (i.e. -1/0/+1). This idea sounds good but in practice there are vendor-specific functions which return enum microcode_match_result and I don't see how it could be easily replaced with NULL/-1/0/+1 without code changes. I also find the enum values easier to read. Sergey
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |