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 smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 C09F8C433EF for ; Wed, 29 Jun 2022 06:15:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4645A4058E; Wed, 29 Jun 2022 06:15:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4645A4058E Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=MY/2R8fO X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CM8p6GW8jO9K; Wed, 29 Jun 2022 06:15:43 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1C5DF400A6; Wed, 29 Jun 2022 06:15:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 1C5DF400A6 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 00785C0032; Wed, 29 Jun 2022 06:15:42 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id B00ECC002D for ; Wed, 29 Jun 2022 06:15:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 750B04058E for ; Wed, 29 Jun 2022 06:15:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 750B04058E X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QcveplGVpLXf for ; Wed, 29 Jun 2022 06:15:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4793B400A6 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by smtp2.osuosl.org (Postfix) with ESMTPS id 4793B400A6 for ; Wed, 29 Jun 2022 06:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656483340; x=1688019340; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=MIRJXsI3AGI9TOUBaCXQFdgFRZepMITCdgAbqxVUet0=; b=MY/2R8fO8KF4PxFaSouucgfYq9NyLGuO1meX1PFfWcM+stoqP1g7fY+p sOkVjXQi+g7B2Tvycw5T09K+aUz+xaY1qgVaq1K1a/Q71uquDIK9/PJ7I dA185Nh9KagMXLrVkJ3PeRxq+04g4FeV9JIjcbKm536PRvPUtRWOpfkvO 1Rje1QyjUkhwAuyg/YnVMVA8/cHPcXZz8Cf23Th1//Lk2ef7YG2D17ArT OlbOoZGIJv1w0ak9PwSs/MOgW7TElEYVApiN7L5cbqYUYleJ33qlbQccy HgZIBWOVn5HAO8d6u4konawg+HP6aurTzN5GhdSSPPvj5i6/JHY/x4t6L Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="282669503" X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="282669503" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 23:15:39 -0700 X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="595103334" Received: from zhaohaif-mobl1.ccr.corp.intel.com (HELO [10.254.214.131]) ([10.254.214.131]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 23:15:30 -0700 Message-ID: <2e99710b-becc-1e03-fa10-ad5f2dd06802@linux.intel.com> Date: Wed, 29 Jun 2022 14:15:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v9 10/11] iommu: Per-domain I/O page fault handling To: Jean-Philippe Brucker , Baolu Lu References: <20220621144353.17547-1-baolu.lu@linux.intel.com> <20220621144353.17547-11-baolu.lu@linux.intel.com> <693a3604-d70b-e08c-2621-7f0cb9bdb6ca@linux.intel.com> <75b17c70-1658-91ea-0992-1be769550943@linux.intel.com> <935ca9e3-28c9-99af-5609-41bb1500b2b3@linux.intel.com> From: Ethan Zhao In-Reply-To: Cc: Kevin Tian , Dave Jiang , Ashok Raj , iommu@lists.linux.dev, Robin Murphy , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Christoph Hellwig , Jean-Philippe Brucker , Vinod Koul , Jacob jun Pan , Jason Gunthorpe , Will Deacon 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: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" CuWcqCAyMDIyLzYvMjggMjI6MjAsIEplYW4tUGhpbGlwcGUgQnJ1Y2tlciDlhpnpgZM6Cj4gT24g VHVlLCBKdW4gMjgsIDIwMjIgYXQgMDc6NTM6MzlQTSArMDgwMCwgQmFvbHUg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haWxpbmcgbGlzdAppb21tdUBsaXN0cy5saW51eC1mb3VuZGF0aW9uLm9yZwpo dHRwczovL2xpc3RzLmxpbnV4Zm91bmRhdGlvbi5vcmcvbWFpbG1hbi9saXN0aW5mby9pb21tdQ== From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3A337E0 for ; Wed, 29 Jun 2022 06:15:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656483349; x=1688019349; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=MIRJXsI3AGI9TOUBaCXQFdgFRZepMITCdgAbqxVUet0=; b=J5dhK/r8VgiCoHB5/jwDISC4q1Sp2Yd+NwHR1BQ8vuUx/woryIqdmSOI wD7szY1EAeAX1ZJeR+gpdmXpc/kU+gDwHzgNVFmFnk1xfSCx/yGg+ZVmm T1ET/BDMjP29liyg0xYztYe/IpRu/QCdSJB+AXFQvC6YS19ZY+mzsbe71 gbvVq9tOSb+geyBnKDflGoCPmNzv2pE6wHEJPEyNaEXRrtEpOMZboLfiH 4VzRFeNYdcEzFU89xJN/8Hr+TwTBBZ1TpaYnVImY3aAbN+A4KfnlTq6ej ePcMEsS7O3qbwB4J/G25ETazt3O6KYdjIHm4iqxRLUYbT/LLPkJkd4YHW Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="270699441" X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="270699441" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 23:15:39 -0700 X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="595103334" Received: from zhaohaif-mobl1.ccr.corp.intel.com (HELO [10.254.214.131]) ([10.254.214.131]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 23:15:30 -0700 Message-ID: <2e99710b-becc-1e03-fa10-ad5f2dd06802@linux.intel.com> Date: Wed, 29 Jun 2022 14:15:28 +0800 Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v9 10/11] iommu: Per-domain I/O page fault handling To: Jean-Philippe Brucker , Baolu Lu Cc: Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Jean-Philippe Brucker , Dave Jiang , Vinod Koul , Eric Auger , Liu Yi L , Jacob jun Pan , iommu@lists.linux-foundation.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <20220621144353.17547-1-baolu.lu@linux.intel.com> <20220621144353.17547-11-baolu.lu@linux.intel.com> <693a3604-d70b-e08c-2621-7f0cb9bdb6ca@linux.intel.com> <75b17c70-1658-91ea-0992-1be769550943@linux.intel.com> <935ca9e3-28c9-99af-5609-41bb1500b2b3@linux.intel.com> From: Ethan Zhao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <20220629061528.YCke_W-NGPXTPmuSnnv4TiKBna6KAyv4IAPyyHmYsMo@z> 在 2022/6/28 22:20, Jean-Philippe Brucker 写道: > On Tue, Jun 28, 2022 at 07:53:39PM +0800, Baolu Lu wrote: >>>>> Once the iopf_handle_single() is removed, the name of >>>>> iopf_handle_group() looks a little weired >>>>> >>>>> and confused, does this group mean the iommu group (domain) ? >>>>> while I take some minutes to >>>> No. This is not the iommu group. It's page request group defined by the >>>> PCI SIG spec. Multiple page requests could be put in a group with a >>>> same group id. All page requests in a group could be responded to device >>>> in one shot. >>> Thanks your explaination, understand the concept of PCIe PRG.  I meant >>> >>> do we still have the necessity to mention the "group" here in the name >>> >>> iopf_handle_group(),  which one is better ? iopf_handle_prg() or >>> >>> iopf_handler(),  perhaps none of them ? :) >> Oh! Sorry for the misunderstanding. >> >> I have no strong feeling to change this naming. :-) All the names >> express what the helper does. Jean is the author of this framework. If >> he has the same idea as you, I don't mind renaming it in this patch. > I'm not attached to the name, and I see how it could be confusing. Given > that io-pgfault is not only for PCIe, 'prg' is not the best here either. > iopf_handle_faults(), or just iopf_handler(), seem more suitable. Both iopf_handle_faults() and iopf_handler() looks straight, iopf_handler() saves one word 'faults', iopf already has the meaning 'io page fault' , so iopf_handler() is clear enough I think. Thanks, Ethan > > Thanks, > Jean -- "firm, enduring, strong, and long-lived"