]> xenbits.xensource.com Git - xen.git/commitdiff
VMX: relax incoming BNDCFGS check
authorJan Beulich <jbeulich@suse.com>
Fri, 3 Jun 2016 13:28:10 +0000 (15:28 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 3 Jun 2016 13:28:10 +0000 (15:28 +0200)
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 <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/hvm/vmx/vmx.c

index 3acf1ab98a6f649236b4e5bf675372f846fd9698..743b5a1442093da83bdf4351bc41f9142d62c4b5 100644 (file)
@@ -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: