[xen stable-4.8] VMX: allow migration of guests with SSBD enabled

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen stable-4.8] VMX: allow migration of guests with SSBD enabled

patchbot
commit 090d47c927e91bb882952b4c141e3498cdf6e2a8
Author:     Jan Beulich <[hidden email]>
AuthorDate: Fri Nov 23 11:52:54 2018 +0100
Commit:     Jan Beulich <[hidden email]>
CommitDate: Fri Nov 23 11:52:54 2018 +0100

    VMX: allow migration of guests with SSBD enabled
   
    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 <[hidden email]>
---
 xen/arch/x86/hvm/vmx/vmx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 9652de32e2..ab39a45bda 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -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;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.8

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog