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 9B443C4332F for ; Thu, 24 Feb 2022 05:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbiBXFbU (ORCPT ); Thu, 24 Feb 2022 00:31:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbiBXFbS (ORCPT ); Thu, 24 Feb 2022 00:31:18 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC3DB23BF28; Wed, 23 Feb 2022 21:30:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645680649; x=1677216649; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=MRJOuFFYYPPC0Fs9nMbQSx2XuzsoF0+2SRmq/hChfag=; b=QPLGr+QJ9Ys2dsrgnq93k1WfQgvhyKpq2SJCeDjnoJJ0morpyOgztwv1 RcSM9Vbr3qesQWiwFoxFHagJdZ9R3nwCq/L1a5tEwc47dxfK+gYwd7oN7 q7wew9fXwhhQdbG4hYFL9AM6HIfrOfDcohBaWp/qRnuEy8yV0XBiREHH7 EJQi6k94YFoMTiNihKWXPfydNWc7v3vklwbTU/1KcO+aPHnNHWA3pVi+d ACdmiOWPB3liaY7CB82QCwkKrFTfeqhfVy6lVpdV1C3l2pgRU9E3gsfd8 7aUNixOdrjVIiA0GIG9dM6aKo1M+bwHaVYbBitsfRgTfNv9E+GrR6/JVR Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="239549729" X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="239549729" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 21:30:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="684161288" Received: from allen-box.sh.intel.com (HELO [10.239.159.118]) ([10.239.159.118]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2022 21:30:40 -0800 Message-ID: Date: Thu, 24 Feb 2022 13:29:11 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: baolu.lu@linux.intel.com, Greg Kroah-Hartman , Joerg Roedel , Alex Williamson , Bjorn Helgaas , Christoph Hellwig , Kevin Tian , Ashok Raj , Will Deacon , Dan Williams , rafael@kernel.org, Diana Craciun , Cornelia Huck , Eric Auger , Liu Yi L , Jacob jun Pan , Chaitanya Kulkarni , Stuart Yoder , Laurentiu Tudor , Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter , Li Yang , Dmitry Osipenko , iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 01/11] iommu: Add dma ownership management interfaces Content-Language: en-US To: Jason Gunthorpe , Robin Murphy References: <20220218005521.172832-1-baolu.lu@linux.intel.com> <20220218005521.172832-2-baolu.lu@linux.intel.com> <20220223180244.GA390403@nvidia.com> From: Lu Baolu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/24/22 1:16 PM, Lu Baolu wrote: > Hi Robin and Jason, > > On 2/24/22 2:02 AM, Jason Gunthorpe 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. > > So we don't need the owner pointer in the API anymore, right? Oh, NO. The owner token represents that the group has been claimed for user space access. And the default domain auto-attach policy will be changed accordingly. So we still need this. Sorry for the noise. Best regards, baolu