[v5,1/7] KVM: nVMX: Prepend "nested_vmx_" to check_vmentry_{pre,post}reqs()
diff mbox series

Message ID 20181212183012.32356-2-krish.sadhukhan@oracle.com
State New
Headers show
Series
  • [v5,1/7] KVM: nVMX: Prepend "nested_vmx_" to check_vmentry_{pre,post}reqs()
Related show

Commit Message

Krish Sadhukhan Dec. 12, 2018, 6:30 p.m. UTC
.. as they are used only in nested vmx context.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
---
 arch/x86/kvm/vmx.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

Patch
diff mbox series

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 02edd99..6ae408e 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -13003,7 +13003,8 @@  static int nested_vmx_check_nmi_controls(struct vmcs12 *vmcs12)
 	return 0;
 }
 
-static int check_vmentry_prereqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
+static int nested_vmx_check_vmentry_prereqs(struct kvm_vcpu *vcpu,
+					struct vmcs12 *vmcs12)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
 	bool ia32e;
@@ -13185,8 +13186,8 @@  static int nested_vmx_check_vmcs_link_ptr(struct kvm_vcpu *vcpu,
 	return r;
 }
 
-static int check_vmentry_postreqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
-				  u32 *exit_qual)
+static int nested_vmx_check_vmentry_postreqs(struct kvm_vcpu *vcpu,
+					 struct vmcs12 *vmcs12, u32 *exit_qual)
 {
 	bool ia32e;
 
@@ -13379,7 +13380,7 @@  static int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
 			return -1;
 		}
 
-		if (check_vmentry_postreqs(vcpu, vmcs12, &exit_qual))
+		if (nested_vmx_check_vmentry_postreqs(vcpu, vmcs12, &exit_qual))
 			goto vmentry_fail_vmexit;
 	}
 
@@ -13515,7 +13516,7 @@  static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
 			launch ? VMXERR_VMLAUNCH_NONCLEAR_VMCS
 			       : VMXERR_VMRESUME_NONLAUNCHED_VMCS);
 
-	ret = check_vmentry_prereqs(vcpu, vmcs12);
+	ret = nested_vmx_check_vmentry_prereqs(vcpu, vmcs12);
 	if (ret)
 		return nested_vmx_failValid(vcpu, ret);
 
@@ -14980,8 +14981,8 @@  static int vmx_set_nested_state(struct kvm_vcpu *vcpu,
 			return -EINVAL;
 	}
 
-	if (check_vmentry_prereqs(vcpu, vmcs12) ||
-	    check_vmentry_postreqs(vcpu, vmcs12, &exit_qual))
+	if (nested_vmx_check_vmentry_prereqs(vcpu, vmcs12) ||
+	    nested_vmx_check_vmentry_postreqs(vcpu, vmcs12, &exit_qual))
 		return -EINVAL;
 
 	vmx->nested.dirty_vmcs12 = true;