Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3352548imw; Wed, 6 Jul 2022 23:37:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uygKDPmXdDexi38SjcVH0f38KghRPZIikptK8eiZMcXIpnYATOjmotXE5yCMLUn4pYz3WI X-Received: by 2002:a17:907:2d24:b0:726:34e6:52fd with SMTP id gs36-20020a1709072d2400b0072634e652fdmr43734402ejc.307.1657175827659; Wed, 06 Jul 2022 23:37:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657175827; cv=pass; d=google.com; s=arc-20160816; b=wkoLwh0ZgCzx9+SOSqzXU9PtMoSvtgDI9VEhxaWB1ps//tIc7mLO45Eh0Eq01XtLjD MqETIzHWQuwiICLUuqbzxmnQOoBtvn1dQnT4kPUz8BISqgsB5Bn6or7Hjbjorh1KVBD0 gdk0Nr27QKaUpO6e6ZxZwDwNQz9AiGYy9k01tt3bQeL2OO2GBVj5X0MfBnepT5h/o9Fm ByzZEdzEGfFNxcyirlYy8G6yWeNmtIMnrR9/FOk8ZhqF0kukVAieo8k7yMUguZfmp0Rr Wkl3o8wMlBTe7qJP91eBxkKTODrFLfDQWoiB4XGzqWbOXmcqqjo+FvWRC6ZKIfkV7llZ N8FA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=ye10hM3rzbbBjZ0ETRxS9cm+vzm82pbFIhW2byhgvQc=; b=H0sMfmqEGbVKmPCI9qZCkxSuPpP9GdSZ9znswBOQdFHVdcJFwgsX0oWnY5qCeMC/c6 rmZzsie6ibPME4t0lJlNqN97YH5vg9JyJWmzLiquPITaVHN8je2erWBw1JkgFDcrSQXg rJfchu0u1EiHjU5JQ3g5wASKLOXX8+ZU1LB6w5cOZ8y9EkAWtWMZnBtWPhWmzJnHUCcS Fx4MaHEGosgihh4sDioEikMcWBqoufm1wiA0XPyAaTn/lP/pncuH9zXAZXrqVS9fXkv+ nrh3a+pZcdNb/v2QdbXqhzO25RgtXrmf+2wZcSwh9zAS0tfPgXd/UtKvqv/cdoTccNOe XcEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EgBpEK+9; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f15-20020a056402194f00b0043a734c7014si8208320edz.78.2022.07.06.23.36.25; Wed, 06 Jul 2022 23:37:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EgBpEK+9; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232095AbiGGGIv (ORCPT + 99 others); Thu, 7 Jul 2022 02:08:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbiGGGIu (ORCPT ); Thu, 7 Jul 2022 02:08:50 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE271B1CE; Wed, 6 Jul 2022 23:08:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657174128; x=1688710128; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=ye10hM3rzbbBjZ0ETRxS9cm+vzm82pbFIhW2byhgvQc=; b=EgBpEK+9ZnRAZB1H0WPsSoYxrPaTc4flE40KebVLHmRrOhrHE4EEJFKc STQAMRazMbn3e6PHjkQvX7p3UtVPlUbsSBgq4WK/r2P2pgeI6qHnfFH02 HG4BUhRqqwCRxLNPo+rh/aFPASIFdfwYDk4TL+s8KGDSiYym7e5N3LyMa YYvhBxUIz6eE+txG8pGK8UpxpfAaE9dC0v//2AS01Vzc2SkBKVkGHkYvz e+kldPLb/VHlSPVx1+ykPQzBjTB6GV9TX/tWAdt6+7ZLSy8wKWlss7H6F SCGxHWQFyBACOYJP/wrINs9hQkt70061iw3uFOfv+I4p0BozzZAZSYC53 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10400"; a="272733887" X-IronPort-AV: E=Sophos;i="5.92,252,1650956400"; d="scan'208";a="272733887" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 23:08:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,252,1650956400"; d="scan'208";a="650995051" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga008.fm.intel.com with ESMTP; 06 Jul 2022 23:08:47 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 6 Jul 2022 23:08:47 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 6 Jul 2022 23:08:47 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.42) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 6 Jul 2022 23:08:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NbGzA4JIzWMiMwYs3sBqsinnbqa/CUPbAE7QwreyetN15AMU1bBH9+olB8qGrNPqj2p34qya0bj4tAMv1LVs8ffbjkNDzF+0v29NoP8SMx/CDD7YwF3zFPPywtefRMi+/x7GSlFiwME7PKddRKGZqCqICdAWR5rgrZ8/uT0zy175VH96GYStlFe31Wvqtk1rlWiIlKODYjBeyqZq+Hpdp5d8ua0PNCl0Xstof5br3ZpFA5H25zQK7lEwYzLCTrUmDQyCX61zvwFjcQU94fKlB4XsrQDH7TDT5D9yWRgudGBNMJxUUD7+rDTf/5P+Oltm40a0TjeGXZfVFsGbUgPT0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ye10hM3rzbbBjZ0ETRxS9cm+vzm82pbFIhW2byhgvQc=; b=USDEV2Jj0zI7WFtmk1wwnxPDK+ozhbGE1IqOGO9WLWtJkaSWogrM7dQjyX/+MYmtzLKvM9Vv8IX6Ka04wmZ6degh5OBOXqRzWCMNIU7LIhRekrCS2dBlZPeig2r0P7BVjoqUU7XCtbOl8eSfxbYQ8YxgzKVlwMwaCdsJruTfRQJI+oBPPQvoMsOKANskpDcsK4caMu+WWLeLUXjK0egmFofkn/NvQm1xMQbTbRsMVYCBE/aac7Dh8bqeBnejufdbLofsXMMGGmHQwlo9jyby+w0E4xP7kP33SPe3ymCRKjBWl5wglsAcZF9+bIkdnqzAQ6BA62qUn5OdfYC9bpva2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BN9PR11MB5276.namprd11.prod.outlook.com (2603:10b6:408:135::18) by SN6PR11MB3293.namprd11.prod.outlook.com (2603:10b6:805:be::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.17; Thu, 7 Jul 2022 06:08:45 +0000 Received: from BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::8435:5a99:1e28:b38c]) by BN9PR11MB5276.namprd11.prod.outlook.com ([fe80::8435:5a99:1e28:b38c%2]) with mapi id 15.20.5395.021; Thu, 7 Jul 2022 06:08:45 +0000 From: "Tian, Kevin" To: Nicolin Chen , "kwankhede@nvidia.com" , "corbet@lwn.net" , "hca@linux.ibm.com" , "gor@linux.ibm.com" , "agordeev@linux.ibm.com" , "borntraeger@linux.ibm.com" , "svens@linux.ibm.com" , "zhenyuw@linux.intel.com" , "Wang, Zhi A" , "jani.nikula@linux.intel.com" , "joonas.lahtinen@linux.intel.com" , "Vivi, Rodrigo" , "tvrtko.ursulin@linux.intel.com" , "airlied@linux.ie" , "daniel@ffwll.ch" , "farman@linux.ibm.com" , "mjrosato@linux.ibm.com" , "pasic@linux.ibm.com" , "vneethv@linux.ibm.com" , "oberpar@linux.ibm.com" , "freude@linux.ibm.com" , "akrowiak@linux.ibm.com" , "jjherne@linux.ibm.com" , "alex.williamson@redhat.com" , "cohuck@redhat.com" , "jgg@nvidia.com" , "hch@infradead.org" CC: "linux-s390@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-doc@vger.kernel.org" , "intel-gfx@lists.freedesktop.org" , "jchrist@linux.ibm.com" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "intel-gvt-dev@lists.freedesktop.org" , "Xu, Terrence" Subject: RE: [RFT][PATCH v2 0/9] Update vfio_pin/unpin_pages API Thread-Topic: [RFT][PATCH v2 0/9] Update vfio_pin/unpin_pages API Thread-Index: AQHYkQGYmzwXVwAIR0+upNM3ZOmxoq1ybcTA Date: Thu, 7 Jul 2022 06:08:45 +0000 Message-ID: References: <20220706062759.24946-1-nicolinc@nvidia.com> In-Reply-To: <20220706062759.24946-1-nicolinc@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: edb57e31-3fac-4124-1ced-08da5fdf2675 x-ms-traffictypediagnostic: SN6PR11MB3293:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: rN1dbzqg1C4BHL5DB5c/ZPMktGVsaJj6rUIJ7BpksUDa0aqcQRpiWxAvwSRcZ+V045292dTSY4hCkKkLxRF98vXNPeAeoSY9m8kBbpfVsDEH2LsqcK4VJi0FW6iGxPTrpf6JKrSewkW6Hr6ULM+5lFx1fNSQ4/niY1/uCqL2mWutGHb6QgfDko4ujuY0jDdSFXF/+zXdobZLRr0oqrNkfVWfJEiZ8opMxfx2NnJEp1p7H2IfuzwOKF4/lJ0GsvORloAu+IeNstcCHMyaFtzEAEXlAu6n0lQLpB5jvsjbTcBoLJhzXzJaVriCBmSMTIHJEOHAFVqJVcTEmdgO1QlHOpK5gf7+dVda1f06K39gC8HM3KJNuokQAum3fRNL5VkCC5l7Kx1rzQSRNJkLDGAZPgGdEuBC6+qhkzGuqamXLdoWD6nXDhJlUx9pa38+VfMFdxWa/Yoe95PhozYxsoPQvRUtoxdNe6lVypkrAWhhmKaJ6lMdxyFktXVyD4ZKpv7IRGR/8mwXDBO3Xu8IPh3dH/MNkp6r4f7hChOidvFiRYxAnNJJMOk7WcB/L76zbTJ0UYHP++UIYt9TLpVpahBAht6+U5fhXe+ozfgpECogplwFqoVLoEw1aVeCXZ1H58HTZwvG0c3n4OlV2i+ucUC5eA6EldyvVXlBrRCchF88A9ghXA3GDAXfk+OKje9LXRIORB8YdXmkrxYrYPB0zGLNJYmFiyWtsGVMj9JBva1lAoKzG7aSGJ5ug8yh5TgtPAk10gwfoL/AcT464mr4iR4vIE4Ymxll85f54KuXbiLc+4iZG+Esg/Xc8NOQ2bUkaLOQ6B50Pz+AjFpE7AfSM4z2mDMaU5oRyFfqayw0pF0e9Fo= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5276.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(136003)(376002)(396003)(366004)(39860400002)(346002)(9686003)(478600001)(54906003)(110136005)(38070700005)(966005)(38100700002)(186003)(316002)(8676002)(41300700001)(4326008)(15650500001)(76116006)(86362001)(66946007)(71200400001)(122000001)(5660300002)(66446008)(26005)(64756008)(8936002)(83380400001)(7416002)(55016003)(52536014)(33656002)(6506007)(7406005)(7696005)(2906002)(66556008)(82960400001)(921005)(66476007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?sYLKAky3pV803I2SXnwgoWNV6MGPz70A/cBCnQ6WUcB7MQN5OeUZ0+RRDqlZ?= =?us-ascii?Q?1i+oBGlTnJmq4VCnAAwOlfC5GdjM/OzROXV07Yt1h/nOD4srN39zwzB+PVAp?= =?us-ascii?Q?TBacnhUoL9K9a9Epa56F9n+OdWYUogpBjRuLG+WyF/riLWKe5In5oBTA6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O00KFqCs4Uov1KIIp7DEny5?= =?us-ascii?Q?gdIzdg+xbQh3EdClhxgY4tmiu3KpXtNwCG/dukoShaEZBj2rpgYSaQk+n1I9?= =?us-ascii?Q?BQG+GB9bx3Ak1WzYJoX73jcXDzM0fJqi+83EtueMKCwd0xdbLXHHyqp8am6W?= =?us-ascii?Q?wF8o2sPA0/JBY4AaP0h4nXoqgav/4P/GCeBNZjbgal0SKy+RfGEhmGN+dUVI?= =?us-ascii?Q?ZNux30sJvcULCXXNSTrU5PTLdvfbaPoIofrPB/VSxIdEtEyxZqIVNTnL5pkF?= =?us-ascii?Q?viV17YbnrkyGhhzWO5THPNhF2eYDWMU705tdVj4nUkEWKXu0ep4UZ53PNDXG?= =?us-ascii?Q?EvCGFIfGS2NWPVrzF/+UvYxyWJX+kb3h51aDYK7KaLhP9AJgW/SdwiL4LCRz?= =?us-ascii?Q?RBwK8JxlJzIpHPNxIBkoNjSiQA8Q2oZ2S7OC8IFVXCQfyFExfjBGcPn0y26T?= =?us-ascii?Q?1gR497XjLV7T2NN7po8U6kvxyYt3vAmLVvUpy36/Bwbho+PCgXbCSTjhrvIo?= =?us-ascii?Q?lEpEu0F9/lF/0Hett1ckVut3fPpPnx90hB9cGLYo?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR11MB5276.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: edb57e31-3fac-4124-1ced-08da5fdf2675 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Jul 2022 06:08:45.3589 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XOlCJE0sx2F6s57xOMtfdTNhw/KfzBI49vzPY0G36PyVK5n9kQwW8S982M9j+ByvTJ3cKAim2B/+tW40yatm8Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3293 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Nicolin Chen > Sent: Wednesday, July 6, 2022 2:28 PM >=20 > This is a preparatory series for IOMMUFD v2 patches. It prepares for > replacing vfio_iommu_type1 implementations of vfio_pin/unpin_pages() > with IOMMUFD version. >=20 > There's a gap between these two versions: the vfio_iommu_type1 version > inputs a non-contiguous PFN list and outputs another PFN list for the > pinned physical page list, while the IOMMUFD version only supports a > contiguous address input by accepting the starting IO virtual address > of a set of pages to pin and by outputting to a physical page list. >=20 > The nature of existing callers mostly aligns with the IOMMUFD version, > except s390's vfio_ccw_cp code where some additional change is needed > along with this series. Overall, updating to "iova" and "phys_page" > does improve the caller side to some extent. >=20 > Also fix a misuse of physical address and virtual address in the s390's > crypto code. And update the input naming at the adjacent vfio_dma_rw(). >=20 > This is on github: > https://github.com/nicolinc/iommufd/commits/vfio_pin_pages >=20 > Request for testing: I only did build for s390 and i915 code, so it'd > be nice to have people who have environment to run sanity accordingly. >=20 +Terrence who is testing it for i915 now...