diff mbox

kvm: x86: vmx: rename some ops

Message ID 1427364924-3421-1-git-send-email-tiejun.chen@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tiejun Chen March 26, 2015, 10:15 a.m. UTC
Just like svm, we'd better make this more readable as well since
virt/kvm already have some common functions with same name.

Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
---
 arch/x86/kvm/vmx.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff mbox

Patch

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index f7b20b4..d9c2eca 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1113,7 +1113,7 @@  static inline bool cpu_has_vmx_pml(void)
 	return vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_ENABLE_PML;
 }
 
-static inline bool report_flexpriority(void)
+static inline bool vmx_report_flexpriority(void)
 {
 	return flexpriority_enabled;
 }
@@ -2826,7 +2826,7 @@  static void vmx_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg)
 	}
 }
 
-static __init int cpu_has_kvm_support(void)
+static __init int cpu_has_vmx_support(void)
 {
 	return cpu_has_vmx();
 }
@@ -2865,7 +2865,7 @@  static void kvm_cpu_vmxon(u64 addr)
 			: "memory", "cc");
 }
 
-static int hardware_enable(void)
+static int vmx_hardware_enable(void)
 {
 	int cpu = raw_smp_processor_id();
 	u64 phys_addr = __pa(per_cpu(vmxarea, cpu));
@@ -2929,7 +2929,7 @@  static void kvm_cpu_vmxoff(void)
 	asm volatile (__ex(ASM_VMX_VMXOFF) : : : "cc");
 }
 
-static void hardware_disable(void)
+static void vmx_hardware_disable(void)
 {
 	if (vmm_exclusive) {
 		vmclear_local_loaded_vmcss();
@@ -5987,7 +5987,7 @@  static void update_ple_window_actual_max(void)
 			                    ple_window_grow, INT_MIN);
 }
 
-static __init int hardware_setup(void)
+static __init int vmx_hardware_setup(void)
 {
 	int r = -ENOMEM, i, msr;
 
@@ -6196,7 +6196,7 @@  out:
     return r;
 }
 
-static __exit void hardware_unsetup(void)
+static __exit void vmx_hardware_unsetup(void)
 {
 	free_page((unsigned long)vmx_msr_bitmap_legacy_x2apic);
 	free_page((unsigned long)vmx_msr_bitmap_longmode_x2apic);
@@ -10122,14 +10122,14 @@  static void vmx_enable_log_dirty_pt_masked(struct kvm *kvm,
 }
 
 static struct kvm_x86_ops vmx_x86_ops = {
-	.cpu_has_kvm_support = cpu_has_kvm_support,
+	.cpu_has_kvm_support = cpu_has_vmx_support,
 	.disabled_by_bios = vmx_disabled_by_bios,
-	.hardware_setup = hardware_setup,
-	.hardware_unsetup = hardware_unsetup,
+	.hardware_setup = vmx_hardware_setup,
+	.hardware_unsetup = vmx_hardware_unsetup,
 	.check_processor_compatibility = vmx_check_processor_compat,
-	.hardware_enable = hardware_enable,
-	.hardware_disable = hardware_disable,
-	.cpu_has_accelerated_tpr = report_flexpriority,
+	.hardware_enable = vmx_hardware_enable,
+	.hardware_disable = vmx_hardware_disable,
+	.cpu_has_accelerated_tpr = vmx_report_flexpriority,
 
 	.vcpu_create = vmx_create_vcpu,
 	.vcpu_free = vmx_free_vcpu,