From: Jan Beulich Date: Fri, 3 Jun 2016 13:28:10 +0000 (+0200) Subject: VMX: relax incoming BNDCFGS check X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1026 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=268ead59ce10967cf7490353d743ebc1bb7a9a4c;p=xen.git VMX: relax incoming BNDCFGS check Accepting zero here even when !cpu_has_mpx makes the restore side symmetric to the save logic (which avoids saving the value if zero), i.e. makes either side independent of the logic on the other side. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Acked-by: Kevin Tian Release-acked-by: Wei Liu --- diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 3acf1ab98a..743b5a1442 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -824,7 +824,7 @@ static int vmx_load_msr(struct vcpu *v, struct hvm_msr *ctxt) case MSR_IA32_BNDCFGS: if ( cpu_has_mpx ) __vmwrite(GUEST_BNDCFGS, ctxt->msr[i].val); - else + else if ( ctxt->msr[i].val ) err = -ENXIO; break; case MSR_IA32_XSS: