]> xenbits.xensource.com Git - xen.git/commitdiff
VMX: allow migration of guests with SSBD enabled
authorJan Beulich <jbeulich@suse.com>
Fri, 23 Nov 2018 10:52:54 +0000 (11:52 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 23 Nov 2018 10:52:54 +0000 (11:52 +0100)
The backport of cd53023df9 ("x86/msr: Virtualise MSR_SPEC_CTRL.SSBD for
guests to use") did not mirror the PV side change into the HVM (VMX-
specific) code path.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vmx/vmx.c

index 9652de32e243158bec42d4b8a7ceefd91343f3a6..ab39a45bdac8e7572066c90957e85e9a2dc9fd02 100644 (file)
@@ -874,7 +874,8 @@ static int vmx_load_msr(struct vcpu *v, struct hvm_msr *ctxt)
              * ignored) when STIBP isn't enumerated in hardware.
              */
             else if ( ctxt->msr[i].val &
-                      ~(SPEC_CTRL_IBRS | SPEC_CTRL_STIBP) )
+                      ~(SPEC_CTRL_IBRS | SPEC_CTRL_STIBP |
+                        (boot_cpu_has(X86_FEATURE_SSBD) ? SPEC_CTRL_SSBD : 0)) )
                 err = -ENXIO;
             else
                 v->arch.spec_ctrl = ctxt->msr[i].val;