x86/HVM: constify VMFUNC emulation hook
authorJan Beulich <jbeulich@suse.com>
Tue, 3 Jan 2017 08:44:43 +0000 (09:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Jan 2017 08:44:43 +0000 (09:44 +0100)
... to clarify that the register state does not get altered (behind the
back of the emulator).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c
xen/include/asm-x86/hvm/hvm.h

index 68db0cb645736c88519a48429f4940a41a619b37..15d66a279cdc8ab63929b6520c9c3eee64cc9433 100644 (file)
@@ -2006,7 +2006,7 @@ static void vmx_vcpu_update_vmfunc_ve(struct vcpu *v)
     vmx_vmcs_exit(v);
 }
 
-static int vmx_vcpu_emulate_vmfunc(struct cpu_user_regs *regs)
+static int vmx_vcpu_emulate_vmfunc(const struct cpu_user_regs *regs)
 {
     int rc = X86EMUL_EXCEPTION;
     struct vcpu *curr = current;
index 98176463049af052e83eeb2af32155226f97af6d..8c95c085599afdfa2c1be330875c142af65ccfcf 100644 (file)
@@ -208,7 +208,7 @@ struct hvm_function_table {
     void (*altp2m_vcpu_update_p2m)(struct vcpu *v);
     void (*altp2m_vcpu_update_vmfunc_ve)(struct vcpu *v);
     bool_t (*altp2m_vcpu_emulate_ve)(struct vcpu *v);
-    int (*altp2m_vcpu_emulate_vmfunc)(struct cpu_user_regs *regs);
+    int (*altp2m_vcpu_emulate_vmfunc)(const struct cpu_user_regs *regs);
 
     /*
      * Parameters and callbacks for hardware-assisted TSC scaling,