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 AA6EAC43334 for ; Wed, 29 Jun 2022 00:25:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3B275409F4; Wed, 29 Jun 2022 00:25:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3B275409F4 Authentication-Results: smtp4.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=eHUlByxt 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 oq4cEpq-kXcm; Wed, 29 Jun 2022 00:24:59 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 92F5F409E8; Wed, 29 Jun 2022 00:24:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 92F5F409E8 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5D282C0039; Wed, 29 Jun 2022 00:24:58 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8E120C002D for ; Wed, 29 Jun 2022 00:24:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 581DA60BA4 for ; Wed, 29 Jun 2022 00:24:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 581DA60BA4 Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eHUlByxt 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 IZ0wqC6jB29n for ; Wed, 29 Jun 2022 00:24:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 03F8D60B60 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by smtp3.osuosl.org (Postfix) with ESMTPS id 03F8D60B60 for ; Wed, 29 Jun 2022 00:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656462296; x=1687998296; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=gNrBHCQAvCRcX09U/UlWMcKB1+tzLb4/Y4Z/doplvUA=; b=eHUlByxtGBuVoFhS/+wN3WdRyKAmBpke3Fgj7C71No/XgIVZFkKsX+uY JlcfszFXCIdqBcOlwcDaw+Fux8ZvORsQJC8GL0AMsx6lQVW063Uo0bdsU 7yGPCcqKJOoFk4BiqQMwKF4m8mn47TW4Ck8qfsAqXwl279Gdkoh8PX0SS JSxE7JqwPVq1oKBZ5ipCcq4D5R9GL7wBLSY6rTrIJZgRZj7S2weiNM6GR IXV/wJbj580YcnYzo6wp+wn3X2BD00sqNIUs2WAF+e4pmTEK84mITcqFe SpGFEM+tMEQhNAm5OxbEXhC691NV5Ul0ruD+990H8koAJuq20qkRq1Kev w==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="345876687" X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="345876687" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 17:24:55 -0700 X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="647142607" Received: from xuepengx-mobl1.ccr.corp.intel.com (HELO [10.255.29.216]) ([10.255.29.216]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 17:24:51 -0700 Message-ID: Date: Wed, 29 Jun 2022 08:24:49 +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 v9 10/11] iommu: Per-domain I/O page fault handling Content-Language: en-US To: Jean-Philippe Brucker 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: Baolu Lu In-Reply-To: Cc: Kevin Tian , Dave Jiang , Ashok Raj , iommu@lists.linux.dev, Robin Murphy , iommu@lists.linux-foundation.org, Jacob jun Pan , Christoph Hellwig , Jean-Philippe Brucker , Vinod Koul , Ethan Zhao , Jason Gunthorpe , Will Deacon , linux-kernel@vger.kernel.org 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" T24gMjAyMi82LzI4IDIyOjIwLCBKZWFuLVBoaWxpcHBlIEJydWNrZXIgd3JvdGU6Cj4gT24gVHVl L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52.151]) (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 1FC977B for ; Wed, 29 Jun 2022 00:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656462297; x=1687998297; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=gNrBHCQAvCRcX09U/UlWMcKB1+tzLb4/Y4Z/doplvUA=; b=LcVpow0jlsl3hf8DwsbTB16DJuWgYk72eRoWH0QXFe2hrajTojfgxyjD 0e8cJD2AN7rrlsBEyI5FCYv2RDMeaYUF+5dovHzgDjfjDsIoF7APE47qS Kg/lAGNQ60gAXEKUfx8EcaTndeOq3I1UFgE1eBC9iEhRE6ZUIWoZYKyaO uQP81s4emfx/MB+TIWuHkyQYK71LSp6+ZrLW+BQktComwBBTKyil2Bq3X SMJkx9MoopHfh4kES5wRtV0+oHixi9WVGX2zn2HbaahPkCpL2R3yc3NYD iyE94O6z7DLBlbb4ukExQbL9+KvZwKDSA9Cm2nIs4OYyhUDArgQHZntD/ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="262290644" X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="262290644" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 17:24:55 -0700 X-IronPort-AV: E=Sophos;i="5.92,230,1650956400"; d="scan'208";a="647142607" Received: from xuepengx-mobl1.ccr.corp.intel.com (HELO [10.255.29.216]) ([10.255.29.216]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2022 17:24:51 -0700 Message-ID: Date: Wed, 29 Jun 2022 08:24:49 +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 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: baolu.lu@linux.intel.com, Ethan Zhao , 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 Subject: Re: [PATCH v9 10/11] iommu: Per-domain I/O page fault handling Content-Language: en-US To: Jean-Philippe Brucker 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: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <20220629002449._r3tpA_ZL0fFI_v1Y5G2QFpMZi8Qp94sya1Jkaag5wE@z> On 2022/6/28 22:20, Jean-Philippe Brucker wrote: > 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. Okay, so I will rename it to iopf_handle_faults() in this patch. Best regards, baolu