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

Re: [PATCH 3/5] x86/msr: Expose MSR_ARCH_CAPS in the raw and host policies


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 14 Jun 2021 14:57:03 +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-SenderADCheck; bh=E88rxmzha68DnX7MDCCamoXuD+jSA9NYX9LK2SOH100=; b=oWU2G/RhwJjCbjUxnTOJJ6v9nvgMijXvwC0SwS35zbMEWA/NYLxXzA0tudZDMVx1m4MW4e7kAY8QwECaDCDxy9x8CWO87Dj8AlpJcU/0tKE3Rnwzq+28kvuWWc1OU5IP6blWCjAtY87QzlLK/0OgJ6mmQRN9cIGF9EqpnfEdgzYBMTlPv+L9sS/JUG6D1b+KxylsWtFlDCq/ZHXZdhpW7IdrfukuPm2PueIz4W78ByFqprryOLqTxeahVRScOa6pyEH+rmPPM2WzR/hHdoK6dBNbzGw3DD1r1YKktcPs50nVzUOF7sEga5McrAI3ifgqyIxLc6mbN6xKKmvmgKqfAw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQIhAwYUQ0++TmX4+yYQGaax+xmgOU8zk6uV+6KOcwhQEFTmT/qiRc2GCEB3I0aJKNmu8dWoM+H+vr+ZhiCCaNQp7MgxTpd4dckIZzCirQiziY5qxHb4BKNflION0gr8taXWmgwa1QoxxdfRI8bNRfdwcriSWGspu1EMAeUxtwHsF2MIVGH+mhteJgfpH05QbTv+6O6YR7R3nu1rPA6Olda1+uGIAGNjMtcrUV7CnZ8P5moLbcLu3hhwtZ+ZGKYEzRncCQx39Z6Y32a1TG4QhsBkh11HCDsNjN9bL+aM+4ugEA8P3CMH2G9z3NYofE+dqoAqlG99DuEp0sCxEytHkw==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>, Edwin Torok <edvin.torok@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 14 Jun 2021 12:57:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.06.2021 18:36, Andrew Cooper wrote:
> @@ -60,6 +65,11 @@ static void __init calculate_host_policy(void)
>      /* 0x000000ce  MSR_INTEL_PLATFORM_INFO */
>      /* probe_cpuid_faulting() sanity checks presence of 
> MISC_FEATURES_ENABLES */
>      mp->platform_info.cpuid_faulting = cpu_has_cpuid_faulting;
> +
> +    mp->arch_caps.raw &=
> +        (ARCH_CAPS_RDCL_NO | ARCH_CAPS_IBRS_ALL | ARCH_CAPS_RSBA |
> +         ARCH_CAPS_SKIP_L1DFL | ARCH_CAPS_SSB_NO | ARCH_CAPS_MDS_NO |
> +         ARCH_CAPS_IF_PSCHANGE_MC_NO | ARCH_CAPS_TSX_CTRL | 
> ARCH_CAPS_TAA_NO);
>  }

Isn't this a little too simple? For CPUID we consider the host policy
to be what Xen is using. Taking ARCH_CAPS_SKIP_L1DFL as an example,
we're not using it unconditionally (depending on opt_md_clear_hvm and
opt_l1d_flush), i.e. there's command line control over its use just
like there is over the CPUID bits. Or take ARCH_CAPS_RDCL_NO, which
we set unilaterally for AMD/Hygon.

I don't mind it remaining this simple for the moment, but then at
least the commit message should state that this is currently over-
simplifying things. If you agree, then with suitable wording added:
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

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