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

Jin Nan Wang posted 1 patch 4 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/20190731130853.18591-1-jnwang@suse.com
xen/arch/x86/spec_ctrl.c | 2 ++
1 file changed, 2 insertions(+)
[Xen-devel] [PATCH] Speculative mitigation facilities report wrong status v2
Posted by Jin Nan Wang 4 years, 8 months ago
Add a check about X86_FEATURE_MD_CLEAR to avoid to print "None".
---
 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH] Speculative mitigation facilities report wrong status v2
Posted by Andrew Cooper 4 years, 8 months ago
On 31/07/2019 14:09, Jin Nan Wang wrote:

This wants at least a minimal aspect of description from your first
patch, i.e. that booting with spec-ctrl=0 results in Xen printing "None
MD_CLEAR".

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

Needs a SoB tag.

The actual code change is correct.

~Andrew

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