From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH v2] x86/irq: Probe for PIC presence before allocating descs for legacy IRQs Date: Mon, 16 Nov 2015 22:39:01 +0100 (CET) Message-ID: References: <1446543614-3621-1-git-send-email-vkuznets@redhat.com> <564A43F5.30602@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <564A43F5.30602@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: x86@kernel.org, linux-kernel@vger.kernel.org, xen-devel , Ingo Molnar , "H. Peter Anvin" , Vitaly Kuznetsov , "K. Y. Srinivasan" , Jiang Liu List-Id: xen-devel@lists.xenproject.org On Mon, 16 Nov 2015, Boris Ostrovsky wrote: > Xen expects legacy interrupts to be there (pretty much for the same reason as > Hyper-V does) and with this change arch_probe_nr_irqs() returns zero and no > descriptors are allocated. Right, because everything which has a PIT gets them and everything which does not have a PIT does not. > We can allocate those descriptors as needed in xen_irq_init() (if we know that > IRQs are legacy), although that would look somewhat ugly and out of place. Why preallocating them in xen_irq_init()? You simply can remove the NR_IRQS_LEGACY checks in xen_allocate_irq_gsi/xen_free_irq(), right? Thanks, tglx