From: Andrew Cooper Date: Thu, 16 Nov 2017 18:40:27 +0000 (+0000) Subject: x86/migrate: Move MSR_SPEC_CTRL on migrate X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~683 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0cf2a4eb769302b7d7d7835540e7b2f15006df30;p=xen.git x86/migrate: Move MSR_SPEC_CTRL on migrate Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index e68c7be1b0..06f1006f19 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1284,6 +1284,7 @@ long arch_do_domctl( struct xen_domctl_vcpu_msr msr = {}; struct vcpu *v; static const uint32_t msrs_to_send[] = { + MSR_SPEC_CTRL, MSR_INTEL_MISC_FEATURES_ENABLES, }; uint32_t nr_msrs = ARRAY_SIZE(msrs_to_send); @@ -1407,6 +1408,7 @@ long arch_do_domctl( switch ( msr.index ) { + case MSR_SPEC_CTRL: case MSR_INTEL_MISC_FEATURES_ENABLES: if ( guest_wrmsr(v, msr.index, msr.value) != X86EMUL_OKAY ) break; diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 2689046ee5..c4287a35e8 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1327,6 +1327,7 @@ static int hvm_load_cpu_xsave_states(struct domain *d, hvm_domain_context_t *h) #define HVM_CPU_MSR_SIZE(cnt) offsetof(struct hvm_msr, msr[cnt]) static const uint32_t msrs_to_send[] = { + MSR_SPEC_CTRL, MSR_INTEL_MISC_FEATURES_ENABLES, }; static unsigned int __read_mostly msr_count_max = ARRAY_SIZE(msrs_to_send); @@ -1462,6 +1463,7 @@ static int hvm_load_cpu_msrs(struct domain *d, hvm_domain_context_t *h) { int rc; + case MSR_SPEC_CTRL: case MSR_INTEL_MISC_FEATURES_ENABLES: rc = guest_wrmsr(v, ctxt->msr[i].index, ctxt->msr[i].val);