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 12FD8C433EF for ; Tue, 28 Jun 2022 14:21:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 94FED40C3C; Tue, 28 Jun 2022 14:21:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 94FED40C3C Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=M4Yy8bip 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 nFROIS39syrS; Tue, 28 Jun 2022 14:21:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 621C14014D; Tue, 28 Jun 2022 14:21:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 621C14014D Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 35AC9C0039; Tue, 28 Jun 2022 14:21:12 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id D14B4C002D for ; Tue, 28 Jun 2022 14:21:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id B236240608 for ; Tue, 28 Jun 2022 14:21:10 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B236240608 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 E0OV77W7tjRj for ; Tue, 28 Jun 2022 14:21:10 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B07274014D Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by smtp2.osuosl.org (Postfix) with ESMTPS id B07274014D for ; Tue, 28 Jun 2022 14:21:09 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id pk21so26158203ejb.2 for ; Tue, 28 Jun 2022 07:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=AZ1tY/fbYnbotdriO5S1rk84v9dQ1fc1bIXXi25ViSs=; b=M4Yy8biplcD6xIbSik7Fcanj3qmtX6uFR9Lkcg9HY9n8g3FbAUo/QCyipVsW7Jci/W 76nJc0C4Qpa49bHjnodI8YHf+WPa5SaGG+EjfkUFHOKnlUtuQ6CROXVHEuKZnX/CpnBb mX6lu4SJJksUAqA5Mt/x2GJW7I+b6qEIW+PXpPA/+w2YWkE+9QRCSUIvYGi5xprrKF9D rVQ3kf6SiheUWDlrr/LE0VkX54WLqK4BZIiUu0tzWsts/0WbnNKrk0IqYkokD3unorO7 V0ZCyCwpJtlkSobho6Ucmi7hZHCLLGDYI8FgiZaC5zhiI7DhrFhYUjIn7/mV5L1eDGZb V2PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=AZ1tY/fbYnbotdriO5S1rk84v9dQ1fc1bIXXi25ViSs=; b=ppbaGIJEED0ZuymIREyUculkPLD+SN2v3gLZxXWfgJTxO0Bruz9Xq0YMv0h+tDa6Q7 Sngig++4BOYWaIObhpqkw8o5vX9/dYOA0DxT8iJAohdPntq+c4IAspMO3YS3Nob70KSm r7f8euHuEImwF2988UT1+UDNCx1+HS0wvSLJdzH9ZmoUTlTq4HMpOh4EObMD7YyLrrJ5 NuSGBn9urB2eVvnlGZ70DBos/ZtiGTRnDPzqLWAx4fE8Q9QSJQ6bqY7h3vFNhXBKe54f Du1lPwmKMlJMe8ERTa0bI29SgOFbsp5tDQone3q7sdmRpHvsmhp0g1olyiZiAPYvGLJL Edug== X-Gm-Message-State: AJIora/vzeRBNY465v5L23jgCAuDpyE1wKR3c+Pssi0YCl6XBPIKwLWu X01XoAM92p28pOvEMgwlknM75Q== X-Google-Smtp-Source: AGRyM1vBIfDF8EgzPZnXgOQ5Ii/P2pbYxSeydCSmLWtpDh0bAERdGZisVP2CiMBF+dMiaZzFptnbAw== X-Received: by 2002:a17:907:8a25:b0:726:c9f2:2f5e with SMTP id sc37-20020a1709078a2500b00726c9f22f5emr4317430ejc.286.1656426067781; Tue, 28 Jun 2022 07:21:07 -0700 (PDT) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id w16-20020a1709061f1000b0071d3b6ed4eesm6518768ejj.160.2022.06.28.07.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 07:21:07 -0700 (PDT) Date: Tue, 28 Jun 2022 15:20:43 +0100 From: Jean-Philippe Brucker To: Baolu Lu Subject: Re: [PATCH v9 10/11] iommu: Per-domain I/O page fault handling Message-ID: 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <935ca9e3-28c9-99af-5609-41bb1500b2b3@linux.intel.com> 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 , Ethan Zhao , Jason Gunthorpe , Will Deacon , Jacob jun Pan 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" T24gVHVlLCBKdW4gMjgsIDIwMjIgYXQgMDc6NTM6MzlQTSArMDgwMCwgQmFvbHUgTHUgd3JvdGU6 Cj4gPiA+ID4gT25jZSB0aGUgaW9wZl9oYW5kbGVfc2luZ2xlKCkgaXMgcmVtb3ZlZCwgdGhlIG5h bWUgb2YKPiA+ID4gPiBpb3BmX2hhbmRsZV9ncm91cCgpIGxvb2tzIGEgbGl0dGxlIHdlaXJlZAo+ ID4gPiA+IAo+ID4gPiA+IGFuZCBjb25mdXNlZCwgZG9lcyB0aGlzIGdyb3VwIG1lYW4gdGhlIGlv bW11IGdyb3VwIChkb21haW4pID8KPiA+ID4gPiB3aGlsZSBJIHRha2Ugc29tZSBtaW51dGVzIHRv Cj4gPiA+IAo+ID4gPiBOby4gVGhpcyBpcyBub3QgdGhlIGlvbW11IGdyb3VwLiBJdCdzIHBhZ2Ug cmVxdWVzdCBncm91cCBkZWZpbmVkIGJ5IHRoZQo+ID4gPiBQQ0kgU0lHIHNwZWMuIE11bHRpcGxl IHBhZ2UgcmVx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25seSBmb3IgUENJ ZSwgJ3ByZycgaXMgbm90IHRoZSBiZXN0IGhlcmUgZWl0aGVyLgppb3BmX2hhbmRsZV9mYXVsdHMo KSwgb3IganVzdCBpb3BmX2hhbmRsZXIoKSwgc2VlbSBtb3JlIHN1aXRhYmxlLgoKVGhhbmtzLApK ZWFuCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCmlvbW11 IG1haWxpbmcgbGlzdAppb21tdUBsaXN0cy5saW51eC1mb3VuZGF0aW9uLm9yZwpodHRwczovL2xp c3RzLmxpbnV4Zm91bmRhdGlvbi5vcmcvbWFpbG1hbi9saXN0aW5mby9pb21tdQ== From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A5C733D6 for ; Tue, 28 Jun 2022 14:21:09 +0000 (UTC) Received: by mail-ej1-f51.google.com with SMTP id q6so26025151eji.13 for ; Tue, 28 Jun 2022 07:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=AZ1tY/fbYnbotdriO5S1rk84v9dQ1fc1bIXXi25ViSs=; b=M4Yy8biplcD6xIbSik7Fcanj3qmtX6uFR9Lkcg9HY9n8g3FbAUo/QCyipVsW7Jci/W 76nJc0C4Qpa49bHjnodI8YHf+WPa5SaGG+EjfkUFHOKnlUtuQ6CROXVHEuKZnX/CpnBb mX6lu4SJJksUAqA5Mt/x2GJW7I+b6qEIW+PXpPA/+w2YWkE+9QRCSUIvYGi5xprrKF9D rVQ3kf6SiheUWDlrr/LE0VkX54WLqK4BZIiUu0tzWsts/0WbnNKrk0IqYkokD3unorO7 V0ZCyCwpJtlkSobho6Ucmi7hZHCLLGDYI8FgiZaC5zhiI7DhrFhYUjIn7/mV5L1eDGZb V2PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=AZ1tY/fbYnbotdriO5S1rk84v9dQ1fc1bIXXi25ViSs=; b=IzgV1iHLHJ3UNOJvo+fpIDLqbAoKJXMz6HgbRgIxuKEQy7tbaYEvlKT1CI3sUj4AwL Q306NeDIGA4I/qp83Xl43jXf/iT229OhYkHsqhrJXJWYVWIyh7bgY5V0jVUs0G8kiQrG DJCVfrW/tZLOx6DDkbk5XCznvBTkZRXwet+ddjNSsjEmkTipeOBSH17xKCK6POGPl/Tm 0RJeIRlFhP3gWPBc7ACyQMYdoAcpK0kftULMvr2h8YndiC7KVVFIUgjgnqsngefK4btq ELxXLJdcbWR53w6TSNGRWhDNW6zM1NK8l0vIAgeGsciTD7H8/K3aLM5hqO8o0qLjxe9O T/eA== X-Gm-Message-State: AJIora/jlFGtAJ1s+1gLCfLFJqFo1NZHHEHEqfEABq9FT+hwhqOvNKaQ bOdLh+T06kfW6D70PLf1Ync6Yg== X-Google-Smtp-Source: AGRyM1vBIfDF8EgzPZnXgOQ5Ii/P2pbYxSeydCSmLWtpDh0bAERdGZisVP2CiMBF+dMiaZzFptnbAw== X-Received: by 2002:a17:907:8a25:b0:726:c9f2:2f5e with SMTP id sc37-20020a1709078a2500b00726c9f22f5emr4317430ejc.286.1656426067781; Tue, 28 Jun 2022 07:21:07 -0700 (PDT) Received: from myrica (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id w16-20020a1709061f1000b0071d3b6ed4eesm6518768ejj.160.2022.06.28.07.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 07:21:07 -0700 (PDT) Date: Tue, 28 Jun 2022 15:20:43 +0100 From: Jean-Philippe Brucker To: Baolu Lu Cc: 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 Message-ID: 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> Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <935ca9e3-28c9-99af-5609-41bb1500b2b3@linux.intel.com> Message-ID: <20220628142043.ivGVse1-0jWi3BZzPejc7eimed91afNrNh1lldFdoAg@z> 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. Thanks, Jean