diff mbox

VMX: don't bypass vmx_update_secondary_exec_control()

Message ID 57E14FF702000078001109F7@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich Sept. 20, 2016, 1:04 p.m. UTC
While putting together another patch modifying the secondary exec
controls I noticed that vmx_vcpu_update_vmfunc_ve() does a raw VMWRITE
instead of going through the designated function. I assume that is not
how it should be.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
VMX: don't bypass vmx_update_secondary_exec_control()

While putting together another patch modifying the secondary exec
controls I noticed that vmx_vcpu_update_vmfunc_ve() does a raw VMWRITE
instead of going through the designated function. I assume that is not
how it should be.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2062,9 +2062,7 @@ static void vmx_vcpu_update_vmfunc_ve(st
     else
         v->arch.hvm_vmx.secondary_exec_control &= ~mask;
 
-    __vmwrite(SECONDARY_VM_EXEC_CONTROL,
-              v->arch.hvm_vmx.secondary_exec_control);
-
+    vmx_update_secondary_exec_control(v);
     vmx_vmcs_exit(v);
 }

Comments

Tian, Kevin Sept. 23, 2016, 11:21 p.m. UTC | #1
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Tuesday, September 20, 2016 9:04 PM
> 
> While putting together another patch modifying the secondary exec
> controls I noticed that vmx_vcpu_update_vmfunc_ve() does a raw VMWRITE
> instead of going through the designated function. I assume that is not
> how it should be.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 

Acked-by: Kevin Tian <kevin.tian@intel.com>
diff mbox

Patch

--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -2062,9 +2062,7 @@  static void vmx_vcpu_update_vmfunc_ve(st
     else
         v->arch.hvm_vmx.secondary_exec_control &= ~mask;
 
-    __vmwrite(SECONDARY_VM_EXEC_CONTROL,
-              v->arch.hvm_vmx.secondary_exec_control);
-
+    vmx_update_secondary_exec_control(v);
     vmx_vmcs_exit(v);
 }