From patchwork Thu Mar 26 10:15:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiejun Chen X-Patchwork-Id: 6097441 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7A2199F2A9 for ; Thu, 26 Mar 2015 10:16:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7DA38203E5 for ; Thu, 26 Mar 2015 10:16:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 729C8203AA for ; Thu, 26 Mar 2015 10:16:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752281AbbCZKQu (ORCPT ); Thu, 26 Mar 2015 06:16:50 -0400 Received: from mga03.intel.com ([134.134.136.65]:49685 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752188AbbCZKQt (ORCPT ); Thu, 26 Mar 2015 06:16:49 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 26 Mar 2015 03:16:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,470,1422950400"; d="scan'208";a="698088870" Received: from tchen0-linux.bj.intel.com ([10.238.154.91]) by fmsmga002.fm.intel.com with ESMTP; 26 Mar 2015 03:16:42 -0700 From: Tiejun Chen To: mtosatti@redhat.com Cc: pbonzini@redhat.com, kvm@vger.kernel.org Subject: [PATCH] kvm: x86: vmx: rename some ops Date: Thu, 26 Mar 2015 18:15:24 +0800 Message-Id: <1427364924-3421-1-git-send-email-tiejun.chen@intel.com> X-Mailer: git-send-email 1.9.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- arch/x86/kvm/vmx.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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,