x86: "spec-ctrl=no-xen" should also disable branch hardening
diff mbox series

Message ID 1e00dc93-e711-9070-1da0-1d4243753a8e@suse.com
State New
Headers show
Series
  • x86: "spec-ctrl=no-xen" should also disable branch hardening
Related show

Commit Message

Jan Beulich Feb. 19, 2020, 8:12 a.m. UTC
This is controlling Xen behavior alone, after all.

Reported-by: Jin Nan Wang <jnwang@suse.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper Feb. 19, 2020, 4:39 p.m. UTC | #1
On 19/02/2020 08:12, Jan Beulich wrote:
> This is controlling Xen behavior alone, after all.
>
> Reported-by: Jin Nan Wang <jnwang@suse.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

Patch
diff mbox series

--- a/xen/arch/x86/spec_ctrl.c
+++ b/xen/arch/x86/spec_ctrl.c
@@ -98,8 +98,6 @@  static int __init parse_spec_ctrl(const
             if ( opt_pv_l1tf_domu < 0 )
                 opt_pv_l1tf_domu = 0;
 
-            opt_branch_harden = false;
-
             if ( opt_tsx == -1 )
                 opt_tsx = -3;
 
@@ -114,6 +112,7 @@  static int __init parse_spec_ctrl(const
             opt_ibpb = false;
             opt_ssbd = false;
             opt_l1d_flush = 0;
+            opt_branch_harden = false;
         }
         else if ( val > 0 )
             rc = -EINVAL;