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

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


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jin Nan Wang <jnwang@xxxxxxxx>
  • Date: Wed, 31 Jul 2019 13:32:32 +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=7/xSTADiD07/l/fosXubD9Scd+qOTl7yjuMAGXPREaU=; b=GBNQ9j00vZ22dK3j7Bv+JRguPbexlsIx/qO9FJrB0t6wUijhxUo0qW7e5EjIvnE4gnZYq63+B/RHSMvbXxdh42Trw2kRZnEivXaofmjNXqEWO3nzBMafbJAfRwRa+Q+0emYjX9095C294tFAl4kYK9zr3fQwcVS/Q49PAvHoBsSGOZR5FfBVSxPQMxDqHI4a9xbtiaG/zAwwdvVc6+aqsw4j7fK+MRHwMmYrGcYpNQmbfIxPhgkTe+Afvg6bbtcgWVFhxhqdUTr4c56Hwsso84Abaq3Aj7o1yd7ejLqxAnxCT0vvkN8M7AXx5WNvxpVyWNJ6NrKpaT0hbDkJF6f4Yg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gBYnbNiqogGt2GU8KGdNu5nRnal27LXu1Khbup217efgRqFMyrZ3VIx1IQuGgdc6cP0nHBIXGcHBMq+D9vQm3+7m1d5tvRf8qnYwL2cjlpGus1bDX9p1w3NXKGSz0DwhL1TQv8pqxxF0NLrFmIJmtRm43DHLrrdVo3Tp4BqQl+oT44ScTLSIvroSF2IB5FMHUdHFyBH8g9gyLYT10e543HFnpRgogryn1PDTLzz3pchMqIA3G1GbbOdmztjDW7v2lqD3hD9MPWTiNmHoGwAvVJyG7o1l+xvECKpMH/e1+I2XR3kg4y1+M2w7Q/VfYETLnWjMbWyTjsYB3sQQe67B9w==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=jnwang@xxxxxxxx;
  • Cc: "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, Jin Nan Wang <jnwang@xxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 31 Jul 2019 13:44:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVR6RnpQWKZDonvE6LwiC0SdZMpQ==
  • Thread-topic: [PATCH] Speculative mitigation facilities report wrong status V4

Booting with spec-ctrl=0 results in Xen printing "None MD_CLEAR".

(XEN)   Support for HVM VMs: None MD_CLEAR
(XEN)   Support for PV VMs: None MD_CLEAR

Add a check about X86_FEATURE_MD_CLEAR to avoid to print "None".

Signed-off-by: James Wang <jnwang@xxxxxxxx>
---
 xen/arch/x86/spec_ctrl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c
index cada9a058e..468a847598 100644
--- a/xen/arch/x86/spec_ctrl.c
+++ b/xen/arch/x86/spec_ctrl.c
@@ -366,6 +366,7 @@ static void __init print_details(enum ind_thunk thunk, 
uint64_t caps)
     printk("  Support for HVM VMs:%s%s%s%s%s\n",
            (boot_cpu_has(X86_FEATURE_SC_MSR_HVM) ||
             boot_cpu_has(X86_FEATURE_SC_RSB_HVM) ||
+            boot_cpu_has(X86_FEATURE_MD_CLEAR)   ||
             opt_eager_fpu)                           ? ""               : " 
None",
            boot_cpu_has(X86_FEATURE_SC_MSR_HVM)      ? " MSR_SPEC_CTRL" : "",
            boot_cpu_has(X86_FEATURE_SC_RSB_HVM)      ? " RSB"           : "",
@@ -377,6 +378,7 @@ static void __init print_details(enum ind_thunk thunk, 
uint64_t caps)
     printk("  Support for PV VMs:%s%s%s%s%s\n",
            (boot_cpu_has(X86_FEATURE_SC_MSR_PV) ||
             boot_cpu_has(X86_FEATURE_SC_RSB_PV) ||
+            boot_cpu_has(X86_FEATURE_MD_CLEAR)  ||
             opt_eager_fpu)                           ? ""               : " 
None",
            boot_cpu_has(X86_FEATURE_SC_MSR_PV)       ? " MSR_SPEC_CTRL" : "",
            boot_cpu_has(X86_FEATURE_SC_RSB_PV)       ? " RSB"           : "",
-- 
2.22.0


_______________________________________________
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®.