From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] No need to kick cpu if not in a guest mode. Date: Tue, 7 Jul 2009 11:56:02 -0300 Message-ID: <20090707145602.GA3797@amt.cnet> References: <20090707122732.GG28046@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:38742 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758334AbZGGO4U (ORCPT ); Tue, 7 Jul 2009 10:56:20 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n67EuK0p025737 for ; Tue, 7 Jul 2009 10:56:20 -0400 Content-Disposition: inline In-Reply-To: <20090707122732.GG28046@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: ACK On Tue, Jul 07, 2009 at 03:27:32PM +0300, Gleb Natapov wrote: > This will save a couple of IPIs. > > Signed-off-by: Gleb Natapov > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index efb0b68..1e30400 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -3498,6 +3498,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) > smp_mb__after_clear_bit(); > > if (vcpu->requests || need_resched() || signal_pending(current)) { > + set_bit(KVM_REQ_KICK, &vcpu->requests); > local_irq_enable(); > preempt_enable(); > r = 1; > -- > Gleb.