From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH] kvm: svm: count all irq windows exit Date: Thu, 8 Mar 2012 11:40:38 +0100 Message-ID: <20120308104038.GQ10684@amd.com> References: <20120308100756.3984.25343.stgit@amd-6168-8-1.englab.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: , , , To: Jason Wang Return-path: Received: from db3ehsobe003.messaging.microsoft.com ([213.199.154.141]:21566 "EHLO db3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029Ab2CHKkv (ORCPT ); Thu, 8 Mar 2012 05:40:51 -0500 Content-Disposition: inline In-Reply-To: <20120308100756.3984.25343.stgit@amd-6168-8-1.englab.nay.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Mar 08, 2012 at 06:07:56PM +0800, Jason Wang wrote: > Also count the exits of fast-path. And align it with how it is counted in VMX. > Signed-off-by: Jason Wang Acked-by: Joerg Roedel > --- > arch/x86/kvm/svm.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 53efd59..5ef7233 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -3235,6 +3235,7 @@ static int interrupt_window_interception(struct vcpu_svm *svm) > svm_clear_vintr(svm); > svm->vmcb->control.int_ctl &= ~V_IRQ_MASK; > mark_dirty(svm->vmcb, VMCB_INTR); > + ++svm->vcpu.stat.irq_window_exits; > /* > * If the user space waits to inject interrupts, exit as soon as > * possible > @@ -3242,7 +3243,6 @@ static int interrupt_window_interception(struct vcpu_svm *svm) > if (!irqchip_in_kernel(svm->vcpu.kvm) && > kvm_run->request_interrupt_window && > !kvm_cpu_has_interrupt(&svm->vcpu)) { > - ++svm->vcpu.stat.irq_window_exits; > kvm_run->exit_reason = KVM_EXIT_IRQ_WINDOW_OPEN; > return 0; > } > -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632