Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754008AbbKQPg0 (ORCPT ); Tue, 17 Nov 2015 10:36:26 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:39045 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752482AbbKQPgX (ORCPT ); Tue, 17 Nov 2015 10:36:23 -0500 From: Boris Ostrovsky To: konrad.wilk@oracle.com, david.vrabel@citrix.com Cc: xen-devel@lists.xen.org, linux-kernel@vger.kernel.org, jgross@suse.com, tglx@linutronix.de, Boris Ostrovsky Subject: [PATCH] xen/events: Always allocate legacy interrupts on PV guests Date: Tue, 17 Nov 2015 10:36:25 -0500 Message-Id: <1447774585-21857-1-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.9.3 X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1683 Lines: 48 After commit 8c058b0b9c34 ("x86/irq: Probe for PIC presence before allocating descs for legacy IRQs") early_irq_init() will no longer preallocate descriptors for legacy interrupts if PIT does not exist. Therefore we need to allocate those descriptors for PV guests ourselves. Signed-off-by: Boris Ostrovsky Suggested-by: Thomas Gleixner --- drivers/xen/events/events_base.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index 849500e..a2bb333 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/xen/events/events_base.c @@ -419,8 +419,8 @@ static int __must_check xen_allocate_irq_gsi(unsigned gsi) if (xen_pv_domain() && !xen_initial_domain()) return xen_allocate_irq_dynamic(); - /* Legacy IRQ descriptors are already allocated by the arch. */ - if (gsi < NR_IRQS_LEGACY) + /* On HVM legacy IRQ descriptors are already allocated by the arch. */ + if (xen_hvm_domain() && gsi < NR_IRQS_LEGACY) irq = gsi; else irq = irq_alloc_desc_at(gsi, -1); @@ -445,8 +445,8 @@ static void xen_free_irq(unsigned irq) kfree(info); - /* Legacy IRQ descriptors are managed by the arch. */ - if (irq < NR_IRQS_LEGACY) + /* On HVM legacy IRQ descriptors are managed by the arch. */ + if (xen_hvm_domain() && irq < NR_IRQS_LEGACY) return; irq_free_desc(irq); -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/