From patchwork Sun Aug 23 11:56:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 43445 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7NC7QfA005531 for ; Sun, 23 Aug 2009 12:07:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933731AbZHWMFz (ORCPT ); Sun, 23 Aug 2009 08:05:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933723AbZHWMDs (ORCPT ); Sun, 23 Aug 2009 08:03:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43287 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933534AbZHWL4t (ORCPT ); Sun, 23 Aug 2009 07:56:49 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7NBupMV019724; Sun, 23 Aug 2009 07:56:51 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7NBum6l031596; Sun, 23 Aug 2009 07:56:50 -0400 Received: from localhost.localdomain (cleopatra.tlv.redhat.com [10.35.255.11]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 6AB082500C5; Sun, 23 Aug 2009 14:56:46 +0300 (IDT) From: Avi Kivity To: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 17/46] KVM: No need to kick cpu if not in a guest mode Date: Sun, 23 Aug 2009 14:56:16 +0300 Message-Id: <1251028605-31977-18-git-send-email-avi@redhat.com> In-Reply-To: <1251028605-31977-1-git-send-email-avi@redhat.com> References: <1251028605-31977-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Gleb Natapov This will save a couple of IPIs. Signed-off-by: Gleb Natapov Acked-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 95fa45c..e3d9040 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3506,6 +3506,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;