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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6EDCC433EF for ; Wed, 23 Feb 2022 18:20:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241030AbiBWSVO (ORCPT ); Wed, 23 Feb 2022 13:21:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243811AbiBWSVN (ORCPT ); Wed, 23 Feb 2022 13:21:13 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0AA804A3DF; Wed, 23 Feb 2022 10:20:45 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B22C8D6E; Wed, 23 Feb 2022 10:20:44 -0800 (PST) Received: from [10.57.40.147] (unknown [10.57.40.147]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 23D623F70D; Wed, 23 Feb 2022 10:20:41 -0800 (PST) Message-ID: <2114e6e6-68cc-4552-8781-0a824de2c0de@arm.com> Date: Wed, 23 Feb 2022 18:20:36 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v6 01/11] iommu: Add dma ownership management interfaces Content-Language: en-GB To: Jason Gunthorpe Cc: Stuart Yoder , rafael@kernel.org, David Airlie , linux-pci@vger.kernel.org, Thierry Reding , Diana Craciun , Dmitry Osipenko , Will Deacon , Ashok Raj , Jonathan Hunter , Christoph Hellwig , Kevin Tian , Chaitanya Kulkarni , Alex Williamson , kvm@vger.kernel.org, Bjorn Helgaas , Dan Williams , Greg Kroah-Hartman , Cornelia Huck , linux-kernel@vger.kernel.org, Li Yang , iommu@lists.linux-foundation.org, Jacob jun Pan , Daniel Vetter References: <20220218005521.172832-1-baolu.lu@linux.intel.com> <20220218005521.172832-2-baolu.lu@linux.intel.com> <20220223180244.GA390403@nvidia.com> From: Robin Murphy In-Reply-To: <20220223180244.GA390403@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 2022-02-23 18:02, Jason Gunthorpe via iommu wrote: > On Wed, Feb 23, 2022 at 06:00:06PM +0000, Robin Murphy wrote: > >> ...and equivalently just set owner_cnt directly to 0 here. I don't see a >> realistic use-case for any driver to claim the same group more than once, >> and allowing it in the API just feels like opening up various potential >> corners for things to get out of sync. > > I am Ok if we toss it out to get this merged, as there is no in-kernel > user right now. > > Something will have to come back for iommufd, but we can look at what > is best suited then. If iommufd plans to be too dumb to keep track of whether it already owns a given group or not, I can't see it dealing with attaching that group to a single domain no more than once, either ;) Robin.