From patchwork Mon Feb 9 09:47:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 5800321 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2409C9F36A for ; Mon, 9 Feb 2015 09:48:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A887220120 for ; Mon, 9 Feb 2015 09:48:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F117200C1 for ; Mon, 9 Feb 2015 09:47:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760095AbbBIJr5 (ORCPT ); Mon, 9 Feb 2015 04:47:57 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:57430 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760086AbbBIJr4 (ORCPT ); Mon, 9 Feb 2015 04:47:56 -0500 Received: from [10.172.193.28] by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1YKkwZ-0004A7-KG; Mon, 09 Feb 2015 09:47:51 +0000 Message-ID: <54D8823F.9080900@canonical.com> Date: Mon, 09 Feb 2015 10:47:43 +0100 From: Stefan Bader User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Sander Eikelenboom , Jiang Liu CC: Thomas Gleixner , Ingo Molnar , Konrad Rzeszutek Wilk , David Vrabel , Tony Luck , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [Bugfix 0/3] Xen IRQ related hotfixes for v3.19 References: <1421720467-7709-1-git-send-email-jiang.liu@linux.intel.com> <1369609199.20150205210757@eikelenboom.it> In-Reply-To: <1369609199.20150205210757@eikelenboom.it> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 05.02.2015 21:07, Sander Eikelenboom wrote: > > Tuesday, January 20, 2015, 3:21:04 AM, you wrote: > >> Hi Thomas, >> This patch set includes three hotfixes related Xen IRQ for v3.19. >> Sorry for the long delay to get these two regressions fixed, it really >> cost me some time to read and understand Xen IRQ code. > >> Patch 1 fixes the failure to register ACPI SCI interrupt on Xen >> domain0 by reworking acpi_gsi_to_irq(). I will backport it to v3.18 >> too once it reaches the mainstream kernel. > >> Patch 2 fixes the regression in Xen PCI device passthrough(pciback). >> It's a temporary solution, I will send the formal fix for v3.20 and >> it has passed tests too. > >> Patch 3 fixes an issue found when reading code. There's no real bug >> reports related to this issue yet. > >> Great thanks to Konrad and Sander for testing fixes for these regressions. > >> Regards, >> Gerry > > Hi Gerry, > > Since these patches now are: tested, reviewed and have landed into mainline, > could you also provide the backports for 3.17 and 3.18 where required ? This would be my attempt of backporting those to 3.18 (I have not tried whether they would apply to 3.17 as well). Those seem to work when test-booting and Sander said he will give them a try as well. But better check yourself I did not mess anything up while backporting. One of the three patches seemed not to be required at all. -Stefan > > The number of people running into these (subtle) issues with these stable > kernels seems to be steadily increasing. > > -- > Sander > >> Jiang Liu (3): >> xen/pci: Kill function xen_setup_acpi_sci() >> xen/irq, ACPI: Fix regression in xen PCI passthrough caused by >> cffe0a2b5a34 >> xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi > >> arch/x86/include/asm/acpi.h | 1 + >> arch/x86/kernel/acpi/boot.c | 26 +++++++++++------------ >> arch/x86/pci/xen.c | 49 ++----------------------------------------- >> drivers/acpi/pci_irq.c | 1 - >> 4 files changed, 16 insertions(+), 61 deletions(-) > > From 96f1d05b484334ff01ea2ee2b66798e294e34d96 Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Tue, 20 Jan 2015 10:21:07 +0800 Subject: [PATCH 2/2] x86/xen: Override ACPI IRQ management callback __acpi_unregister_gsi Xen overrides __acpi_register_gsi and leaves __acpi_unregister_gsi as is. That means, an IRQ allocated by acpi_register_gsi_xen_hvm() or acpi_register_gsi_xen() will be freed by acpi_unregister_gsi_ioapic(), which may cause undesired effects. So override __acpi_unregister_gsi to NULL for safety. Signed-off-by: Jiang Liu Tested-by: Sander Eikelenboom Cc: Tony Luck Cc: xen-devel@lists.xenproject.org Cc: Konrad Rzeszutek Wilk Cc: David Vrabel Cc: Bjorn Helgaas Cc: Graeme Gregory Cc: Lv Zheng Link: http://lkml.kernel.org/r/1421720467-7709-4-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner Signed-off-by: Stefan Bader --- arch/x86/include/asm/acpi.h | 1 + arch/x86/pci/xen.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 0ab4f9f..3a45668 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch/x86/include/asm/acpi.h @@ -50,6 +50,7 @@ void acpi_pic_sci_set_trigger(unsigned int, u16); extern int (*__acpi_register_gsi)(struct device *dev, u32 gsi, int trigger, int polarity); +extern void (*__acpi_unregister_gsi)(u32 gsi); static inline void disable_acpi(void) { diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 6b3cf7c..3c41716 100644 --- a/arch/x86/pci/xen.c +++ b/arch/x86/pci/xen.c @@ -442,6 +442,7 @@ int __init pci_xen_hvm_init(void) * just how GSIs get registered. */ __acpi_register_gsi = acpi_register_gsi_xen_hvm; + __acpi_unregister_gsi = NULL; #endif #ifdef CONFIG_PCI_MSI @@ -464,6 +465,7 @@ int __init pci_xen_initial_domain(void) x86_msi.msix_mask_irq = xen_nop_msix_mask_irq; #endif __acpi_register_gsi = acpi_register_gsi_xen; + __acpi_unregister_gsi = NULL; /* Pre-allocate legacy irqs */ for (irq = 0; irq < nr_legacy_irqs(); irq++) { int trigger, polarity; -- 1.9.1