[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 2/4] x86/microcode: Ignore microcode loading interface for revision = -1


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 5 Jul 2023 16:34:06 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gWh8In+Ih046tj4975K2wzNVkdfZjyhtOeWDXIutzX8=; b=WMUJ/JISw7MeoRiFGsoJlDFXsq+fEYv5GftnQFqCkkqvKtssHPFYppBXU5vm2301HOkzzEwqdzp9ueVAi0+uieAEQhkCGIz6Qjb159XP6ngKNUyCsWdrKtAOaaSjD4NPqVOejreQVX4wKvchRdjNan/tgbzv4Rx7aBj2EhWlLhMzADxboUDAgHWVbF95cy8QUs8iuDUxz1ZJY77LLj83rP+Ffn8J7+qAP8DG5YoUcZnjXL8IfQn0M6gtnDlKIJtpoNkwp2IsmD35NoQWHsYbMjPRZCJHicyGFWn2BPm9k7De9yUQkCDuBRRklrOaR21lFt9mzHdLQE1fuznptNYI2A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JD8uP3gU71VYFsyPMVvLJcUcuJm3Y8+QBQkUtc1rswzqci+69m27qxBtDz57EMtqSBMAEnAoGIm7HyD713V6cV1Q1JERZPQFQ54rUHLRw4uh8due3to2M2ro7Mi3Ki/XVcA8hMl4NsWbNNpogaHCPqZTKdWJohWyMVSRPpH05AngGZnUHVR89dsCA3LyL4Wnx8lg1Q1rnQh1nW7ezcBBDvFPjYwH4qaae0Qg9pTo+GKrzWIGml5w5+W0Y8elF35YX/97I8eWZThT8uKqeA7/X4ynRHSXqOEZV3F41FZewYag3uMHTkgNyJAzL28vW0mfosu8dvcUMNSMfMbEC6QVCg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
  • Delivery-date: Wed, 05 Jul 2023 14:34:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 05.07.2023 16:28, Andrew Cooper wrote:
> On 05/07/2023 3:24 pm, Jan Beulich wrote:
>> On 05.07.2023 16:13, Andrew Cooper wrote:
>>> On 29/06/2023 4:26 pm, Alejandro Vallejo wrote:
>>>> diff --git a/xen/arch/x86/cpu/microcode/core.c 
>>>> b/xen/arch/x86/cpu/microcode/core.c
>>>> index bec8b55db2..b620e3bfa6 100644
>>>> --- a/xen/arch/x86/cpu/microcode/core.c
>>>> +++ b/xen/arch/x86/cpu/microcode/core.c
>>>> @@ -867,10 +867,22 @@ int __init early_microcode_init(unsigned long 
>>>> *module_map,
>>>>          return -ENODEV;
>>>>      }
>>>>  
>>>> -    microcode_grab_module(module_map, mbi);
>>>> -
>>>>      ucode_ops.collect_cpu_info();
>>>>  
>>>> +    /*
>>>> +     * Some hypervisors deliberately report a microcode revision of -1 to
>>>> +     * mean that they will not accept microcode updates. We take the hint
>>>> +     * and ignore the microcode interface in that case.
>>>> +     */
>>>> +    if ( this_cpu(cpu_sig).rev == ~0 )
>>>> +    {
>>>> +        printk(XENLOG_WARNING "Microcode loading disabled\n");
>>> XENLOG_INFO "Found microcode revision ~0;  Disabling loading because of
>>> virt\n"
>>>
>>> It's normal (and not a warning) when running under other hypervisors,
>> Except that INFO won't be visible by default in release configurations.
> 
> Well that's not a bug with microcode then, is it...
> 
> I can't believe I'm having to say no to emitting messages at the wrong
> log level to work around a bug with selecting the default log level in
> the first place.

Hmm, I think not emitting info level messages is quite right. If I'm
not mistaken we emit various others at warning level to "account" for
this (you might instead call it "to work around this").

Furthermore, as to your suggestions here: What would you expect patch
4 to do? Emit yet another message, instead of having both conditions
fold to just one of them?

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.