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 C8A0DC433EF for ; Wed, 1 Jun 2022 09:38:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229688AbiFAJiB (ORCPT ); Wed, 1 Jun 2022 05:38:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349866AbiFAJhc (ORCPT ); Wed, 1 Jun 2022 05:37:32 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72EA213DDD; Wed, 1 Jun 2022 02:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654076251; x=1685612251; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=D7NtTD/QI9HCTZzgqGKCgSrSSUq0k5fYUd5oM5bo5JY=; b=G3zvwCRiDRNivkdtM/m01wXHda3/2bap0PGQPIgurgD/m0orMk3wn3ON msppomuEDWSL5T4jTotk2g9U3A7GLZF6GvkqxcgbvbF49b7+nY3iz7HWn NMEQnKmQz2L95oA9UhcIJb2mEp+6K+9L/2DSd9lL9U2/0H5VjRGs4NMLq A90q0phGiZHaViF11kN1Zsu9DJAGfrhu1jTBRfp/wm0EQLBckTHK14bSH jwAb55wxaoAuLzeAx5KMs7nZmpQ/ArJJZCX92mThpegtX1kUS8HaIYMZs IundusFBY9A/Fy86SXHOaJg0DFOtMv7Y3EMX7x3DwiNrm6EZuHTrIRznZ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="361904366" X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="361904366" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2022 02:37:31 -0700 X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="706981292" Received: from hej1-mobl.ccr.corp.intel.com (HELO [10.255.28.123]) ([10.255.28.123]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2022 02:37:27 -0700 Message-ID: <868984fa-c8bc-635c-1788-99bc8e6fd587@linux.intel.com> Date: Wed, 1 Jun 2022 17:37:25 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: baolu.lu@linux.intel.com, Jason Gunthorpe , "iommu@lists.linux-foundation.org" , LKML , "dmaengine@vger.kernel.org" , Joerg Roedel , David Woodhouse , Jean-Philippe Brucker , Christoph Hellwig , "vkoul@kernel.org" , "robin.murphy@arm.com" , "will@kernel.org" , "Liu, Yi L" , "Jiang, Dave" , "Raj, Ashok" , Eric Auger Subject: Re: [PATCH v4 1/6] iommu: Add a per domain PASID for DMA API Content-Language: en-US To: "Tian, Kevin" , Jacob Pan References: <20220518182120.1136715-1-jacob.jun.pan@linux.intel.com> <20220518182120.1136715-2-jacob.jun.pan@linux.intel.com> <20220524135034.GU1343366@nvidia.com> <20220524081727.19c2dd6d@jacob-builder> <20220530122247.GY1343366@nvidia.com> <628aa885-dd12-8bcd-bfc6-446345bf69ed@linux.intel.com> <20220531102955.6618b540@jacob-builder> From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 2022/6/1 09:43, Tian, Kevin wrote: >> From: Jacob Pan >> Sent: Wednesday, June 1, 2022 1:30 AM >>>> In both cases the pasid is stored in the attach data instead of the >>>> domain. >>>> >> So during IOTLB flush for the domain, do we loop through the attach data? > Yes and it's required. What does the attach data mean here? Do you mean group->pasid_array? Why not tracking the {device, pasid} info in the iommu driver when setting domain to {device, pasid}? We have tracked device in a list when setting a domain to device. Best regards, baolu 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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 25651C433F5 for ; Wed, 1 Jun 2022 09:37:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id BB5C9415FB; Wed, 1 Jun 2022 09:37:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org 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 thZal4rso8p1; Wed, 1 Jun 2022 09:37:33 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5BE4E415FC; Wed, 1 Jun 2022 09:37:33 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2A94EC0039; Wed, 1 Jun 2022 09:37:33 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id ADAA0C002D for ; Wed, 1 Jun 2022 09:37:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8B851415FB for ; Wed, 1 Jun 2022 09:37:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org 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 o9HNLLYyF210 for ; Wed, 1 Jun 2022 09:37:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by smtp4.osuosl.org (Postfix) with ESMTPS id B8166415C5 for ; Wed, 1 Jun 2022 09:37:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654076251; x=1685612251; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=D7NtTD/QI9HCTZzgqGKCgSrSSUq0k5fYUd5oM5bo5JY=; b=G3zvwCRiDRNivkdtM/m01wXHda3/2bap0PGQPIgurgD/m0orMk3wn3ON msppomuEDWSL5T4jTotk2g9U3A7GLZF6GvkqxcgbvbF49b7+nY3iz7HWn NMEQnKmQz2L95oA9UhcIJb2mEp+6K+9L/2DSd9lL9U2/0H5VjRGs4NMLq A90q0phGiZHaViF11kN1Zsu9DJAGfrhu1jTBRfp/wm0EQLBckTHK14bSH jwAb55wxaoAuLzeAx5KMs7nZmpQ/ArJJZCX92mThpegtX1kUS8HaIYMZs IundusFBY9A/Fy86SXHOaJg0DFOtMv7Y3EMX7x3DwiNrm6EZuHTrIRznZ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10364"; a="361904365" X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="361904365" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2022 02:37:31 -0700 X-IronPort-AV: E=Sophos;i="5.91,266,1647327600"; d="scan'208";a="706981292" Received: from hej1-mobl.ccr.corp.intel.com (HELO [10.255.28.123]) ([10.255.28.123]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2022 02:37:27 -0700 Message-ID: <868984fa-c8bc-635c-1788-99bc8e6fd587@linux.intel.com> Date: Wed, 1 Jun 2022 17:37:25 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v4 1/6] iommu: Add a per domain PASID for DMA API Content-Language: en-US To: "Tian, Kevin" , Jacob Pan References: <20220518182120.1136715-1-jacob.jun.pan@linux.intel.com> <20220518182120.1136715-2-jacob.jun.pan@linux.intel.com> <20220524135034.GU1343366@nvidia.com> <20220524081727.19c2dd6d@jacob-builder> <20220530122247.GY1343366@nvidia.com> <628aa885-dd12-8bcd-bfc6-446345bf69ed@linux.intel.com> <20220531102955.6618b540@jacob-builder> From: Baolu Lu In-Reply-To: Cc: "vkoul@kernel.org" , "Jiang, Dave" , "Raj, Ashok" , "will@kernel.org" , Jean-Philippe Brucker , LKML , Christoph Hellwig , "iommu@lists.linux-foundation.org" , Jason Gunthorpe , "dmaengine@vger.kernel.org" , "robin.murphy@arm.com" , David Woodhouse 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" On 2022/6/1 09:43, Tian, Kevin wrote: >> From: Jacob Pan >> Sent: Wednesday, June 1, 2022 1:30 AM >>>> In both cases the pasid is stored in the attach data instead of the >>>> domain. >>>> >> So during IOTLB flush for the domain, do we loop through the attach data? > Yes and it's required. What does the attach data mean here? Do you mean group->pasid_array? Why not tracking the {device, pasid} info in the iommu driver when setting domain to {device, pasid}? We have tracked device in a list when setting a domain to device. Best regards, baolu _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu