From mboxrd@z Thu Jan 1 00:00:00 1970 From: Beth Kon Subject: Re: [PATCH 2/4] Userspace changes for configuring irq0->inti2override (v3) Date: Tue, 12 May 2009 09:20:36 -0400 Message-ID: <4A0977A4.7080001@us.ibm.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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from e2.ny.us.ibm.com ([32.97.182.142]:54558 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbZELNTz (ORCPT ); Tue, 12 May 2009 09:19:55 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e2.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n4CDG0oo006166 for ; Tue, 12 May 2009 09:16:00 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4CDJpbJ197312 for ; Tue, 12 May 2009 09:19:55 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4CDHsVH003061 for ; Tue, 12 May 2009 09:17:54 -0400 In-Reply-To: <20090512105200.GE19446@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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.