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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0CE0AC433F5 for ; Thu, 24 Feb 2022 05:18:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8DA3360BF3; Thu, 24 Feb 2022 05:18:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OtS1sZWfJyp3; Thu, 24 Feb 2022 05:18:30 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id C923260B33; Thu, 24 Feb 2022 05:18:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A1499C0021; Thu, 24 Feb 2022 05:18:29 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 32FFFC0011 for ; Thu, 24 Feb 2022 05:18:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0F25F40920 for ; Thu, 24 Feb 2022 05:18:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mrkDzK3uwHwa for ; Thu, 24 Feb 2022 05:18:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6B4584091F for ; Thu, 24 Feb 2022 05:18:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645679908; x=1677215908; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=egRbENubkOkUmSuijD6lu7Tlla0i2tXbS3AogDwESqU=; b=KlVyzEvu2fGkg67Et9YuHNVWodqfF6X/3ecEVuygQojt3s8BlevZrWwm S9kl2qzXW8A2BZubB4ELjkW61EVCsLRkzd//gCkOWm/fyKRBMFQPYbm6F +Dt4cG0V2COONoRzDJoFyTrrwiBFVKJXmL5TN3cHxCqg5Wzf2SIZjnQzH Dzf8XT8yKUhuPuVWL3+lAp4dJzL+gfZbJ8ij+M4hy1xmxJ94jq6LNEwQ/ ce1eXKkiDpGWnY/5bSzXIdSKwYn6Mb9g/DKlzayrv/KiJ6AuYrnHvL+on WgCZXugYbvtX4Cw6t1uadJ5gulmPaqwyQnbPJ5pHDACggvx3IucY/mqAs w==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="315378575" X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="315378575" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 21:18:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="684158911" 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:18:20 -0800 Message-ID: Date: Thu, 24 Feb 2022 13:16:51 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 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: <20220223180244.GA390403@nvidia.com> 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 X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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? As we will only allow the claiming interface to be called only once, this token is unnecessary. Best regards, baolu _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 04189C433F5 for ; Thu, 24 Feb 2022 05:18:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbiBXFS5 (ORCPT ); Thu, 24 Feb 2022 00:18:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbiBXFS4 (ORCPT ); Thu, 24 Feb 2022 00:18:56 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABD8250B16; Wed, 23 Feb 2022 21:18:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645679907; x=1677215907; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=egRbENubkOkUmSuijD6lu7Tlla0i2tXbS3AogDwESqU=; b=kmC9AkRDQTA/fcqA1jb+31YcFvpDgLqyJyGDoif+U/otcj+UNz7Qs9Go uWGNgb6fMIHV5768XvJusYCAufBWfOmKMJMayOloHJpdXxezXNLPOKw3J xfRFlJtaQbymf5KoK2Zux6EOveU/2HPmHgNBGbU3q0x7c0koRnXqvB38/ s1SDuR8jks/0miOLHF2+rMSI0PSMCguTCc5yz7Z4hW21VbWmE1HdF7Mt6 Y1GOjoS3dvt9WFj35Jt/bmsw5evAJHhyhx7gHun6UxHj/X4Gf/kHmqGtV XxKObAbCZiEV+EfcW0/k+82/7CgjJgaAzM9IuKonTSE1YiOhuA/+j+RcO Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="251887518" X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="251887518" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 21:18:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,393,1635231600"; d="scan'208";a="684158911" 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:18:20 -0800 Message-ID: Date: Thu, 24 Feb 2022 13:16:51 +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: <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 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? As we will only allow the claiming interface to be called only once, this token is unnecessary. Best regards, baolu