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

Re: [Xen-devel] [PATCH] Speculative mitigation facilities report wrong status


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jin Nan Wang <jnwang@xxxxxxxx>
  • Date: Wed, 31 Jul 2019 10:45:04 +0000
  • Accept-language: zh-CN, en-US
  • 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=FAwmBdKZwlpFtqfMPbJY7DqixeV7I1EL21rNS3BUx3k=; b=EiQeXrKi+7lIykBTTmf3aRL4l2ZhttnHKwXnnh1MdF4lGyjvXYwLCwVtnMenN/iulBXQE68p8t+GJhM4YT/0H7Vkm/3ibipYwBiUrlrxLHGlQDSzsV1JTlZ0LYx6WCgTm/jBh6ZDvLzoDe5ijz8YR0D3DZBMcwWCM1iisUOgOhLTT9VXWFpkVMcW46WQzC9BQmsptg8eUiZIzsZb7lLJvqWkCxHnbMuqVvfkPwIJDf9fpfPqGmhStWjze3UbXQK0Kpk2t96oASM6OHFJYTRNjIfgMotqFZrgCr8RyHzK/T2LELD69dylNfw9RlY2xcT5N39Yb6yeFdZMuSiY9yOkdw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cxMyRObhz5qiyxQf4wRB+AQKQ/kSmCsIRqdsu/WVkoawpHqLuMMmphPujbZ1DMpe8UQ+SJKwvzMYrdpunSAXOOq6gglQN5FiiMYnkdotz0qsgnNkdEqRPgiSxXeyqp7FVWfoNb1h55roBmKweeZC90yP9msNqBYBxC9XIX0xDLMmkONx7bZCeOaSj8yqwuHJQk1s16wmtfiAptM7FEdm7VIJap+8cDZx4a1ghmuxQipqCpTC5fKQ/IphRIuEleR/ERCyzTnSAQwW/5rhn2QHsR3fmy1hgFbaMdG+9SYdWAZnVdEfIdEUm1DJGb+c5FWtpjLhg45TAQos9dwcYLGzqQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=jnwang@xxxxxxxx;
  • Cc: "wl@xxxxxxx" <wl@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 31 Jul 2019 10:55:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVR4KQFSckKXZUXUiKuIVTbtEfiqbkel97gAAQlQA=
  • Thread-topic: [PATCH] Speculative mitigation facilities report wrong status

Hi folks,

On 7/31/19 5:44 PM, Andrew Cooper wrote:
> The check for reporting MD_CLEAR must stay as X86_FEATURE_MD_CLEAR,
> because this is a property in microcode which no controls, and nothing
> further to virtualise at Xen's level.

There are two solution, which one would you like?

solution1: make sure set X86_FEATURE_SC_VERW_PV/HVM, under
X86_FEATURE_MD_CLEAR exist.

~ 1084     if ( opt_md_clear_pv && boot_cpu_has(X86_FEATURE_MD_CLEAR))
  1085         setup_force_cpu_cap(X86_FEATURE_SC_VERW_PV);
~ 1086     if ( opt_md_clear_pv || opt_md_clear_hvm &&
boot_cpu_has(X86_FEATURE_MD_CLEAR))
  1087         setup_force_cpu_cap(X86_FEATURE_SC_VERW_IDLE);
~ 1088     if ( opt_md_clear_hvm && !(caps & ARCH_CAPS_SKIP_L1DFL) &&
!opt_l1d_flush && boot_cpu_has(X86_FEATURE_MD_CLEAR))
  1089         setup_force_cpu_cap(X86_FEATURE_SC_VERW_HVM);


Solution2:

   365 #ifdef CONFIG_HVM
   366     printk("  Support for HVM VMs:%s%s%s%s%s\n",
   367            (boot_cpu_has(X86_FEATURE_SC_MSR_HVM) ||
   368             boot_cpu_has(X86_FEATURE_SC_RSB_HVM) ||
~  369             (boot_cpu_has(X86_FEATURE_MD_CLEAR) &&
boot_cpu_has(X86_FEATURE_SC_VERW_HVM)) ||
   370             opt_eager_fpu)                           ?
""               : " None",
   371            boot_cpu_has(X86_FEATURE_SC_MSR_HVM)      ? "
MSR_SPEC_CTRL" : "",
   372            boot_cpu_has(X86_FEATURE_SC_RSB_HVM)      ? "
RSB"           : "",
   373            opt_eager_fpu                             ? "
EAGER_FPU"     : "",
~  374            (boot_cpu_has(X86_FEATURE_MD_CLEAR) &&
boot_cpu_has(X86_FEATURE_SC_VERW_HVM))     ? " MD_CLEAR"      : "");
   375
   376 #endif
   377 #ifdef CONFIG_PV
   378     printk("  Support for PV VMs:%s%s%s%s%s\n",
   379            (boot_cpu_has(X86_FEATURE_SC_MSR_PV) ||
   380             boot_cpu_has(X86_FEATURE_SC_RSB_PV) ||
~  381             (boot_cpu_has(X86_FEATURE_MD_CLEAR) &&
boot_cpu_has(X86_FEATURE_SC_VERW_PV)) ||
   382             opt_eager_fpu)                           ?
""               : " None",
   383            boot_cpu_has(X86_FEATURE_SC_MSR_PV)       ? "
MSR_SPEC_CTRL" : "",
   384            boot_cpu_has(X86_FEATURE_SC_RSB_PV)       ? "
RSB"           : "",
   385            opt_eager_fpu                             ? "
EAGER_FPU"     : "",
~  386            (boot_cpu_has(X86_FEATURE_MD_CLEAR) &&
boot_cpu_has(X86_FEATURE_SC_VERW_PV))      ? " MD_CLEAR"      : "");

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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