From 268ead59ce10967cf7490353d743ebc1bb7a9a4c Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 3 Jun 2016 15:28:10 +0200 Subject: [PATCH] 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 --- xen/arch/x86/hvm/vmx/vmx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.30.2