[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] x86/spec-ctrl: Remove opencoded MSR_ARCH_CAPS check
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Wed, 17 May 2023 17:35:30 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=E3/3VgeGMLkGH9ftmdBlOkYGQeKv/FVRHweKMHlJM6k=; b=ETmcCeMJR3EMyCKxc/ZGOtDHn0TFAIGj9ld+oTT2448Z30o4j1byBbTLMWth2zaIfU0ByEfiE2lMC6bcbS0dUPpAfDo+T4YhBoJt7FI38tMmnHS/WGmSLmQKPlBiPJ8FmfmT41mJWFOMPcoNiN++t+aRelrF28PZH5Vqalkh66Ne46bB6JPdr5ew86xWLjPeKZMOc9plCNRPpqRBIPa9JWdUpy4XOchr3zlScSj04dCSYlnaDh7woYDsvZSi0LMO5wC0uvcnCZ9j/HPEUbalUGcwO1yLnhox+foUi6hVFjNcrRFaG/gj4Yk1aN/gnGwBSfudsrTiiVmvFbbPjs7hhQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FrzuNqSDQwTiyJR0Xca5+KpImQeagVAe6bJwqwu3B3WJ4Z+kxVsoODqhsa78OMHbAZE067UeJCeA6mmYnHYEhelDrJR5ryFouPES5joZ8W2qAYm/XnmHXfHYZHCFdV4q2QQgzdxlAyhNmBtLBtaQ5shATbqpKA+7OxhsYwWCXFpQ2tvMXfgVwFQu1jNskkiJAcVtaHd0WFNYYZVgNpCmblSkcieXF96wE7bXNoD9+iM66CFWDE8/Xi3CnlISUiitAd7v5+juaV2646W2C9Z/nRkoQ5LpkxJBgD1Xkm/AdKP6g6NUxsht/pg8Ig+dLWlnXsTyNHc4qSCmWxG1n/+rbw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 17 May 2023 16:35:55 +0000
- Ironport-data: A9a23:YiAh4qBf4vHKlxVW/wTiw5YqxClBgxIJ4kV8jS/XYbTApG4i0WFRz TZKWjyEM/7fYGDzeoh+Oo+39EsGupXUndUxQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nOHuGmYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFuspvlDs15K6p4G5B4QRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw9+l5IWoe9 tUhcS0pQyu+o/6X7umQY7w57igjBJGD0II3nFhFlGicJ9B2BJfJTuPN+MNS2yo2ioZWB/HCa sEFaD1pKhPdfxlIPVRRA5U79AuqriCnL3sE9xTI9exuvTm7IA9ZidABNPL8fNCQSNoTtUGfv m/cpEzyAw0ANczZwj2Amp6prraXzXqmB9lKTtVU8NZHpWyRnGUNTyQNfniYot+2yR+gXfdQf hl8Fi0G6PJaGFaQZtv3UgC8oXWElgUBQNcWGOo/gCmSzoLE7gDfAXILJhZRZdpjuMIoSDgC0 l6Sg8ivFTFpqKeSS3+W6vGTtzzaBMQOBWoLZCtBRw1V5dDm+dg3lkiWEIclF7OphNroHz222 yqNsCU1m7QUi4gMyrm/+lfExTmro/AlUzII2+keZUr9hisRWWJvT9fABYTzhRqYELukcw==
- Ironport-hdrordr: A9a23:OOHocaMZ3JdMOcBcTuqjsMiBIKoaSvp037BL7TEVdfUxSKb0qy nAppgmPHPP5wr5IUtQ4OxoW5PwI080l6QU3WB5B97LYOCBggWVxepZnOjfKlPbehEWwdQtsZ uII5IUNDQpNykAsS8h2njfLz/8+qjhzEl1v5an856yd3ARV51d
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 17/05/2023 3:47 pm, Jan Beulich wrote:
> On 16.05.2023 16:53, Andrew Cooper wrote:
>> @@ -401,6 +400,8 @@ static void __init print_details(enum ind_thunk thunk,
>> uint64_t caps)
>> cpuid_count(7, 2, &tmp, &tmp, &tmp, &_7d2);
>> if ( boot_cpu_data.extended_cpuid_level >= 0x80000008 )
>> cpuid(0x80000008, &tmp, &e8b, &tmp, &tmp);
>> + if ( cpu_has_arch_caps )
>> + rdmsrl(MSR_ARCH_CAPABILITIES, caps);
> Why do you read the MSR again? I would have expected this to come out
> of raw_cpu_policy now (and incrementally the CPUID pieces as well,
> later on).
Consistency with the surrounding logic.
Also because the raw and host policies don't get sorted until much later
in boot.
> Apart from this, with all the uses further down gone, perhaps there's
> not even a need for the raw value, if you used the bitfields in the
> printk(). Which in turn raises the question whether the #define-s in
> msr-index.h are of much use then anymore.
One of the next phases of work is synthesizing these in the host policy
for CPUs which didn't receive microcode updates (for whatever reason).
There is a valid discussion for whether we ought to render the raw or
host info here (currently we do raw), but I'm not adjusting that in this
patch.
~Andrew
|