From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yunhong Jiang Subject: [RFC PATCH V3 1/5] Rename the vmx_pre/post_block to pi_pre/post_block Date: Fri, 3 Jun 2016 17:42:27 -0700 Message-ID: <1465000951-13343-2-git-send-email-yunhong.jiang@linux.intel.com> References: <1465000951-13343-1-git-send-email-yunhong.jiang@linux.intel.com> Cc: mtosatti@redhat.com, rkrcmar@redhat.com, pbonzini@redhat.com, kernellwp@gmail.com To: kvm@vger.kernel.org Return-path: Received: from mga02.intel.com ([134.134.136.20]:50103 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750872AbcFDAq0 (ORCPT ); Fri, 3 Jun 2016 20:46:26 -0400 In-Reply-To: <1465000951-13343-1-git-send-email-yunhong.jiang@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: From: Yunhong Jiang Prepare to add the HV timer switch to the vmx_pre/post_block. Current functions are only for posted interrupt, rename the function name accordingly. Signed-off-by: Yunhong Jiang --- arch/x86/kvm/vmx.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index fb93010beaa4..51b08cd43bb7 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -10706,7 +10706,7 @@ static void vmx_enable_log_dirty_pt_masked(struct kvm *kvm, * this case, return 1, otherwise, return 0. * */ -static int vmx_pre_block(struct kvm_vcpu *vcpu) +static int pi_pre_block(struct kvm_vcpu *vcpu) { unsigned long flags; unsigned int dest; @@ -10772,7 +10772,15 @@ static int vmx_pre_block(struct kvm_vcpu *vcpu) return 0; } -static void vmx_post_block(struct kvm_vcpu *vcpu) +static int vmx_pre_block(struct kvm_vcpu *vcpu) +{ + if (pi_pre_block(vcpu)) + return 1; + + return 0; +} + +static void pi_post_block(struct kvm_vcpu *vcpu) { struct pi_desc *pi_desc = vcpu_to_pi_desc(vcpu); struct pi_desc old, new; @@ -10813,6 +10821,11 @@ static void vmx_post_block(struct kvm_vcpu *vcpu) } } +static void vmx_post_block(struct kvm_vcpu *vcpu) +{ + pi_post_block(vcpu); +} + /* * vmx_update_pi_irte - set IRTE for Posted-Interrupts * -- 1.8.3.1