Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp748566ybx; Fri, 1 Nov 2019 10:34:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDb9DdGRgdvs5A0SMuSNgmyh4nBkwYm6ogbWoNE1u/cgFWJdX9/Mu8m4vPCLmFVRsJy8Hp X-Received: by 2002:a17:906:85da:: with SMTP id i26mr11163912ejy.186.1572629682515; Fri, 01 Nov 2019 10:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572629682; cv=none; d=google.com; s=arc-20160816; b=c+0lutG44LqjM/6uLAgx839wDQYaqSthZPMllYJZCh/B1rBXAfeZEQgYNuauxvdPLL b6Kl2yyMDz7HKlxuQYge/cdcNfGpduxvAIk5eZsXhvuBpPrA5KbnAFVbD3316nqWmBAB fVfNL3srrLqgl0g2Nwt0p7IkNov1s+7HDHHH7bSq08SGXLBd7tMiNpnGeeJ9s7rHhxpJ h602XqULybhgL3elT2XKBJyxijm/YX/dVXkIPrVbY1Zu0eONpu4J7ZLUOk6pbxNF66Rg JbU9aakXn/oSSYA6xB9u/NXkevKG52Br61sM40sadsHvbp8UkpU+vFNhNRorPX6GxSc6 72Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LMaKGptgc8NhQCaVZ1nRg3S8IQBva5SinmTPILEspLo=; b=PUlOliH9yyD/J7Kw5JREYZoxtLHY3e/nXt8atDYvhvK3ofanElJQR59WhgVj/f+pyP AzcRK9GLUhvVb/gbtDyN5holkIKpPX260ypGPiqNzCWAKx47U9G6LzmgNoxakvTXOm4n InAEm2BQt/ClK0P6kNW9se4QPUUA2a9azQu8wXm5pKRmtyI4qdztcSEQj4aKGs9z7bay a5A9h5/iYlLygrQX382me+Z9hj1xnr6kzVjFuJzddE/T/kDKoWPf5aTFxoAGd29rXiAK 3wPW6rdE4pR68ckonwb6Hb4jbMjYod2qXvnS/5b3odZ/AE23XzzQbIZ7kB5cGg4hlfNr 07UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HNqm3Wkx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si1194086edj.143.2019.11.01.10.34.19; Fri, 01 Nov 2019 10:34:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HNqm3Wkx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727917AbfKARVv (ORCPT + 99 others); Fri, 1 Nov 2019 13:21:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:38054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726866AbfKARVv (ORCPT ); Fri, 1 Nov 2019 13:21:51 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 96FF42085B; Fri, 1 Nov 2019 17:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572628910; bh=BROMF+gRXeSy51qya14vXyEQaseWUTq9hj4mzpZv8S4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HNqm3WkxmX5SqCf18g8DLpkh8TebVc3yct+TNG0t6EV+1/50HAVBmlehyJzXWbjpc C+TiG2YeqmiC5sfgM1ZQ/FAc6kgCe9PZ/x7cEsV6W4/fRqfXRluDCpezRyChzcw50w ObhzgEwmmLnyF3X9Pob06HER/VmLrhXZwRtMr6j0= Date: Fri, 1 Nov 2019 17:21:46 +0000 From: Will Deacon To: Jean-Philippe Brucker Cc: Saravana Kannan , LKML , iommu@lists.linux-foundation.org, Bjorn Helgaas , Robin Murphy Subject: Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers Message-ID: <20191101172145.GA3983@willie-the-truck> References: <20191030145112.19738-1-will@kernel.org> <6e457227-ca06-2998-4ffa-a58ab171ce32@arm.com> <20191030155444.GC19096@willie-the-truck> <20191031193758.GA2607492@lophozonia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191031193758.GA2607492@lophozonia> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jean-Philippe, Quick question while you figure out the devlink stuff with Saravana... On Thu, Oct 31, 2019 at 08:37:58PM +0100, Jean-Philippe Brucker wrote: > On Wed, Oct 30, 2019 at 05:57:44PM -0700, Saravana Kannan via iommu wrote: > > > > > Obviously you need to be careful about using IOMMU drivers as modules, > > > > > since late loading of the driver for an IOMMU serving active DMA masters > > > > > is going to end badly in many cases. On Android, we're using device links > > > > > to ensure that the IOMMU probes first. > > > > > > > > Out of curiosity, which device links are those? Clearly not the RPM links > > > > created by the IOMMU drivers themselves... Is this some special Android > > > > magic, or is there actually a chance of replacing all the > > > > of_iommu_configure() machinery with something more generic? > > > > > > I'll admit that I haven't used them personally yet, but I'm referring to > > > this series from Saravana [CC'd]: > > > > > > https://lore.kernel.org/linux-acpi/20190904211126.47518-1-saravanak@google.com/ > > > > > > which is currently sitting in linux-next now that we're upstreaming the > > > "special Android magic" ;) > > Neat, I'm trying to do the same for virtio-iommu. It needs to be modular > because it depends on the virtio transport, which distributions usually > build as a module. So far I've been managing the device links in > virtio-iommu's add_device() and remove_device() callbacks [1]. Since it > relies on the existing probe deferral, I had to make a special case for > virtio-iommu to avoid giving up after initcalls_done [2]. As far as symbols exported from the IOMMU and PCI layers, did you find you needed anything on top of the stuff I'm exporting in patches 1 and 3? Cheers, Will