From patchwork Wed Aug 12 12:17:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 40850 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 n7CCHSFu011759 for ; Wed, 12 Aug 2009 12:17:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751676AbZHLMR0 (ORCPT ); Wed, 12 Aug 2009 08:17:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751743AbZHLMR0 (ORCPT ); Wed, 12 Aug 2009 08:17:26 -0400 Received: from mx2.redhat.com ([66.187.237.31]:55222 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbZHLMRY (ORCPT ); Wed, 12 Aug 2009 08:17:24 -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 n7CCHPOt013977 for ; Wed, 12 Aug 2009 08:17:25 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7CCHOB7012909; Wed, 12 Aug 2009 08:17:24 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7CCHNV0017040; Wed, 12 Aug 2009 08:17:23 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id D802018D466; Wed, 12 Aug 2009 15:17:22 +0300 (IDT) From: Gleb Natapov To: avi@redhat.com Cc: kvm@vger.kernel.org Subject: [PATCH v3 1/8] Do not call ack notifiers on PIC reset. Date: Wed, 12 Aug 2009 15:17:15 +0300 Message-Id: <1250079442-5163-2-git-send-email-gleb@redhat.com> In-Reply-To: <1250079442-5163-1-git-send-email-gleb@redhat.com> References: <1250079442-5163-1-git-send-email-gleb@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org For device assigned it may cause host hang since ack notifier callback enables host interrupt and guest not necessary cleared interrupt condition in an assigned device. For PIT we should not call ack notifier here since interrupt was not acked by a guest and should be redelivered. Signed-off-by: Gleb Natapov --- arch/x86/kvm/i8259.c | 16 ---------------- 1 files changed, 0 insertions(+), 16 deletions(-) diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 01f1516..eb2b8b7 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c @@ -225,22 +225,6 @@ int kvm_pic_read_irq(struct kvm *kvm) void kvm_pic_reset(struct kvm_kpic_state *s) { - int irq, irqbase, n; - struct kvm *kvm = s->pics_state->irq_request_opaque; - struct kvm_vcpu *vcpu0 = kvm->bsp_vcpu; - - if (s == &s->pics_state->pics[0]) - irqbase = 0; - else - irqbase = 8; - - for (irq = 0; irq < PIC_NUM_PINS/2; irq++) { - if (vcpu0 && kvm_apic_accept_pic_intr(vcpu0)) - if (s->irr & (1 << irq) || s->isr & (1 << irq)) { - n = irq + irqbase; - kvm_notify_acked_irq(kvm, SELECT_PIC(n), n); - } - } s->last_irr = 0; s->irr = 0; s->imr = 0;