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 <jbeul...@suse.com> --- 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, 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:
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 <jbeul...@suse.com> --- 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, 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:
_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel