From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: [PATCH] No need to kick cpu if not in a guest mode. Date: Tue, 7 Jul 2009 15:27:32 +0300 Message-ID: <20090707122732.GG28046@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: avi@redhat.com Return-path: Received: from mx2.redhat.com ([66.187.237.31]:33503 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754808AbZGGM1a (ORCPT ); Tue, 7 Jul 2009 08:27:30 -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 n67CRYBH011052 for ; Tue, 7 Jul 2009 08:27:34 -0400 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: 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.