File 5bf7db69-VMX-allow-migration-of-guests-with-SSBD-enabled.patch of Package xen.openSUSE_Leap_42.3_Update
Subject: VMX: allow migration of guests with SSBD enabled
From: Jan Beulich jbeulich@suse.com Fri Nov 23 11:50:17 2018 +0100
Date: Fri Nov 23 11:50:17 2018 +0100:
Git: 7f01558d9b3fc4011741e9f469c96fd93dd8454e
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>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index e4c4d2e565..bc8f566b9c 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -978,7 +978,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 |
+ (v->domain->arch.cpuid->feat.ssbd ? SPEC_CTRL_SSBD : 0)) )
err = -ENXIO;
else
v->arch.spec_ctrl = ctxt->msr[i].val;