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

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


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jin Nan Wang <jnwang@xxxxxxxx>
  • Date: Wed, 31 Jul 2019 13:33:44 +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=n632iQIoIyD+e398gLof4avfu0CPOSIDM0LsFa/BAZ10+i5h0NQ+BW8oq5o7khywLSIRolfPCHVCObUlE1U/7C+QYk60M1qIkgSIFrVSFRZq8cPZ/zLeX7/K2Yoy8ZmiVloGjuTiby6sWr+cqlvXirNn4Ij92+qWnD5LYHGfQb8YNY1BX9nf+CE8cuKnVO5+shf73U6Xg7+k2jAOKy9j+DQfPUy8LOAUuAd/bgse6GFaLrMdoXRhwxbbrJxtaLwdcwLjQNyMyCLu2eKzb1NjET1CJHM6SwQLLT3BaO5RklQfyteu/NPZqBrbQVHEzKQZU9NWFvLEAzPky05UmB0n1A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BZt2hIfetv3QNt1TtZrC+Y9kx0WUeLz36u5DvknRaidh+zDW3fedLRmDcPu6pzyeopx1chLBv16+TEkdoUpuUmmZVBRTqbEoDpk+OgJm25nE8M2zaxP/gXzoSJxvsGOTFAVorrovoeeB3nQAlgsM30E0pxTQlAEjINzYxvfjtBSY6f2s7nC+jHzw8dSxFSQxIhybnngeHBPzZEXD3Nutx4RtLwvN00NuuWu7f4Rg145HpsMbnSNG0H+yJQEc8BJESPXyXfXRrZw0NU0jsBf8qODZBFjRBaTf2GME3V/at6nxQN6Z1EyuzH6BcXMXvwyBlru01WqHR0iu+U4HH9TelQ==
  • 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:37 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVR6SSmciFJgGM2k+zd1smgklw4w==
  • Thread-topic: [PATCH v5] Speculative mitigation facilities report wrong status

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