From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 2/4] Userspace changes for configuring irq0->inti2override (v3) Date: Tue, 12 May 2009 16:37:47 +0300 Message-ID: <20090512133747.GL19446@redhat.com> References: <1242062986-29383-1-git-send-email-eak@us.ibm.com> <1242062986-29383-2-git-send-email-eak@us.ibm.com> <20090512095345.GB19446@redhat.com> <4A094DCE.3080109@redhat.com> <20090512105200.GE19446@redhat.com> <4A0977A4.7080001@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , kvm@vger.kernel.org To: Beth Kon Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44515 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751498AbZELNht (ORCPT ); Tue, 12 May 2009 09:37:49 -0400 Content-Disposition: inline In-Reply-To: <4A0977A4.7080001@us.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, May 12, 2009 at 09:20:36AM -0400, Beth Kon wrote: > Gleb Natapov wrote: >> On Tue, May 12, 2009 at 01:22:06PM +0300, Avi Kivity wrote: >> >>> Gleb Natapov wrote: >>> >>>>> for (i = 0; i < 24; ++i) { >>>>> - r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i); >>>>> + if (i == 0) { >>>>> + r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, 2); >>>>> + } else if (i != 2) { >>>>> + r = kvm_add_irq_route(kvm_context, i, KVM_IRQCHIP_IOAPIC, i); >>>>> + } >>>>> >>>> There is no entry for IRQ2, is this OK? What happens if IRQ2 triggers? >>>> >>> irq 2 is the PIC cascade interrupt. If it is somehow triggered, the >>> kernel will ignore it. >>> >>> >> But here we configure IOAPIC routing. What if IOAPIC is used for >> interrupt delivery and something triggers irq2. There is no entry >> describing it in IOAPIC routing table, so what gsi it will be mapped to? >> >> -- >> > The ACPI spec states that systems that support both APIC and dual-8259 > interrupt models must map system interrupt vectors 0-15 to 8259 IRQs > 0-15, except where interrupt source overrides are provided. We provide > an irq0->inti2 override, and no irq2 override, so irq2 must be unused. OK. I hope we do what ACPI spec states and irq2 never reaches IOAPIC. -- Gleb.