From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD655C433E1 for ; Thu, 27 Aug 2020 07:46:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD63322BF3 for ; Thu, 27 Aug 2020 07:46:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727030AbgH0Hq1 (ORCPT ); Thu, 27 Aug 2020 03:46:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:49900 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726851AbgH0Hq1 (ORCPT ); Thu, 27 Aug 2020 03:46:27 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 49C1EACF2; Thu, 27 Aug 2020 07:46:57 +0000 (UTC) Subject: Re: [patch V2 27/46] x86/xen: Rework MSI teardown To: Thomas Gleixner , LKML Cc: x86@kernel.org, Joerg Roedel , iommu@lists.linux-foundation.org, linux-hyperv@vger.kernel.org, Haiyang Zhang , Jon Derrick , Lu Baolu , Wei Liu , "K. Y. Srinivasan" , Stephen Hemminger , Steve Wahl , Dimitri Sivanich , Russ Anderson , linux-pci@vger.kernel.org, Bjorn Helgaas , Lorenzo Pieralisi , Konrad Rzeszutek Wilk , xen-devel@lists.xenproject.org, Boris Ostrovsky , Stefano Stabellini , Marc Zyngier , Greg Kroah-Hartman , "Rafael J. Wysocki" , Megha Dey , Jason Gunthorpe , Dave Jiang , Alex Williamson , Jacob Pan , Baolu Lu , Kevin Tian , Dan Williams References: <20200826111628.794979401@linutronix.de> <20200826112333.326841410@linutronix.de> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <5c18f793-9212-b7f0-583d-896e1957ba1a@suse.com> Date: Thu, 27 Aug 2020 09:46:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200826112333.326841410@linutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 26.08.20 13:16, Thomas Gleixner wrote: > From: Thomas Gleixner > > X86 cannot store the irq domain pointer in struct device without breaking > XEN because the irq domain pointer takes precedence over arch_*_msi_irqs() > fallbacks. > > XENs MSI teardown relies on default_teardown_msi_irqs() which invokes > arch_teardown_msi_irq(). default_teardown_msi_irqs() is a trivial iterator > over the msi entries associated to a device. > > Implement this loop in xen_teardown_msi_irqs() to prepare for removal of > the fallbacks for X86. > > This is a preparatory step to wrap XEN MSI alloc/free into a irq domain > which in turn allows to store the irq domain pointer in struct device and > to use the irq domain functions directly. > > Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Juergen