Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2627388imw; Wed, 6 Jul 2022 09:03:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sN9/vZR42bqGZ5jB6hTA7TKIXAQ3dx/mIN6yECztKu94uwU/ZplbpKTUtTDw9smLHHI7zl X-Received: by 2002:a05:6402:1e88:b0:435:bf05:f0f with SMTP id f8-20020a0564021e8800b00435bf050f0fmr55473163edf.2.1657123407522; Wed, 06 Jul 2022 09:03:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657123407; cv=pass; d=google.com; s=arc-20160816; b=sNCorryPZKUgAwf9gecDLdXwyK05gskdniExvPzXc4h7skGbzriyCAhvZ+w6ajnlM0 +/o1K1j7WTLq8bErbuzlFTTrVytGXDGMub/XuZ7QBAQVcTGDaPf8BuCnP6aoFq2pmFvn RKhyFawqd/VwpwzJNDKLGVH26aHPvDnIr9JzPnS5wuax+tyjgisdlMTrkClE+NQtPjpC PiXURiY+Ct3p0vmcgUUio+8OwBmeKD429FR3O/gc0rToouwXWshfYBpgCzG4AK6F39Gv FAhJKRixFIQ4/tW67dacMEo7x8ipMrSbRCOn13/sK2z2EiKsHKfO9vPjzwTMoOp2SIIt zIiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OClUjcB2or6x3cMJyYLCNmEzKFa31B1yRRBHLirGXmo=; b=m2CwxoELNk5iNs8wU5I7OrX6tze7mu+hLixr/G04nMSTpKnHt+pu1anaJeDfdLoS5y pRg4DRQIRDwpXyoNScppcCC4+EGZMD5HM8//GuzweOrg4O0EXacPwyaVLccT+YjSEhYf 8haT2tR1jUkybWRVhrkPDx6U3hN08h1Xa8TYxr+R1iTm5E7wolNchOXPGAkkgxR5MoUW 12EPp27QELNrgGvDaR5876Sn5G4AqqPkmSLXEnVPGeEpkvNRGiDJloL4v3nVokixb8aR mtsn268Pn7DHgXs29FFtwoGGGbtH4HCXl6AEqZw7bPhnVi45Z3N0YmUzF9tSqT1Vx6iV jH9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=UWMSWnWh; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w14-20020aa7cb4e000000b0043a6f8e2ec1si4214808edt.312.2022.07.06.09.02.57; Wed, 06 Jul 2022 09:03:27 -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=@Nvidia.com header.s=selector2 header.b=UWMSWnWh; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232287AbiGFPy5 (ORCPT + 99 others); Wed, 6 Jul 2022 11:54:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232544AbiGFPyy (ORCPT ); Wed, 6 Jul 2022 11:54:54 -0400 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2051.outbound.protection.outlook.com [40.107.102.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6350FC41; Wed, 6 Jul 2022 08:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ADll2Sb2WK4Y+Pab5LX/iobxwFTf2YpX7czZMU2LnGivIwAvyuyWg3eJAWSpU41O0dnJQ26/YWBlxdDJ8BLU8wH4LZGmv/jgEHZrzpcbMhLX73lQu5NhOPwDPsWPIq888ipREaR+cX/hOCGS6QnVfKShCjB4YhGeDZTyMJ+h1YsouOp+6CAA701cwGR6Yi1MwNbiM9AnanUm6rAlE5oWzEEpmoqe23skqwukkNTMu8cNOhX9RnK6dc9nOIHDOLxz0ZxZzqaoE984rz6hu8GDiDw6kXt+rGszP3xPdUHeL3levBOnsmZZSiJKY0jqJBoPr1GdynqlBn4Q1BE6e7Jubw== 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=OClUjcB2or6x3cMJyYLCNmEzKFa31B1yRRBHLirGXmo=; b=ZJtqin/XP8nv+P0dq5VADAQrD+SpFcins+p2+xS7tW/jvKCIolCA5N0DCTG5BrNCFgaNGasimKJm05czsGJIk54QYZ8fypW/uybaYlEryf5exnGj4Cjjb/T7SRAy0eSynR79v9YknBVNWuHYebGm7+ZyQ8r6eqELinLRJ27TqL+fc+WpuOZ5wJ6qZw8MTGJ5MEgRnlb3LJ331Flt50WtgXIbYEkCEJPexwJN7aV7jp8kCuBVgbZxQbMq+/hxuKclvtMIGViGZUT4Qkjo2P8GcDiw5tBcpAixGL7jmFr7eJetszD1Z4+FCPTcDXU/winoWG7//YzOQOEZg3FFb0LgRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=linux.ibm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OClUjcB2or6x3cMJyYLCNmEzKFa31B1yRRBHLirGXmo=; b=UWMSWnWheAswvbILmSIP1zJqh8/7dpLiTJuR9LYuW3S6xPZEOKLXhc59MVBUkE9R9T4jpSN67cmUPDPvE++lhs7Rf4x6Dm+/4Xb5nijjoo4GVw2/bRQWMaeIuMQA80ySLN9mF6wUSdsfyKpgp2//ObkKpysd1Gkt6nu7S6ryOHucKbajBy/C7nUllMG/z3XS1hTJA58HUZk0jwS6PAWGr6dGjOybo8myAkmksEl73QrD1tZ2WCEcw54506QIpsIqbvNKJ4AfL5O44lXCKzVOXzb/puwkSXISLi+hiwubNuxi45DBi536paMSAaIHPOTiD9kt99fSwDhgkJ1ifBaOoQ== Received: from DM5PR07CA0106.namprd07.prod.outlook.com (2603:10b6:4:ae::35) by BN6PR1201MB0195.namprd12.prod.outlook.com (2603:10b6:405:53::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.16; Wed, 6 Jul 2022 15:54:52 +0000 Received: from DM6NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ae:cafe::41) by DM5PR07CA0106.outlook.office365.com (2603:10b6:4:ae::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.17 via Frontend Transport; Wed, 6 Jul 2022 15:54:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT044.mail.protection.outlook.com (10.13.173.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5417.15 via Frontend Transport; Wed, 6 Jul 2022 15:54:51 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 6 Jul 2022 15:54:51 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 6 Jul 2022 08:54:50 -0700 Received: from Asurada-Nvidia (10.127.8.14) by mail.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26 via Frontend Transport; Wed, 6 Jul 2022 08:54:48 -0700 Date: Wed, 6 Jul 2022 08:54:46 -0700 From: Nicolin Chen To: Christoph Hellwig CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [RFT][PATCH v2 4/9] vfio: Pass in starting IOVA to vfio_pin/unpin_pages API Message-ID: References: <20220706062759.24946-1-nicolinc@nvidia.com> <20220706062759.24946-5-nicolinc@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e39b936a-f7f4-4c15-9020-08da5f67dccb X-MS-TrafficTypeDiagnostic: BN6PR1201MB0195:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TFOaZNeb5Sx9nNmCgifQETXEhO2iYyRAQiHMxij2hnM+iQl1HjJKOhH4Qw+QBI1LfQR8zu42Cvpuxj5vf05iMlphLzryVWZZ2azP4dVarYthpdQT700u/43w8/gojymDBpNjcpxAX3RspkcjagXqhX7LZ5UB4yyMiQUQ+EoJ3MVNOpD1HVehxlCIejBbh3DmkhYIsN3utfc7085lyBr/G1VlZDZmiiBrXfONiSkf2JwCj22Z0kpi0Yl3a7dP6vmaTnSedkOG/5VekAiVqciGVbI+frrbeUk7LM94p7oxLj8Ttvpc9WLTDrCTuVKK2vC0oNK3omPQ+4yzaXHBkF2s7jjJ4RC5Xo766XkP4DBIpUOorm0QTyg1YIb0hOwtTRlwgexG+06WAl781qhGSOXDht20YkXX7wro71Btx2Kd3X2WB9UrWuWg8EHql6k1g9zPAKjVIjcxgwUQYCDBbWdlb9GkA5OhXAMGTVelQVzfufSxsrclhZPqCSWxeZjXzXL53TQNH67BZQoVcErvw0sOd0FX3VOhxeQI9th5/621szQbsPI3SMrr6R9lYHK/cdLaUv6AiFCgfQJJWmda4PK8NPf5vNDIpv5kr0+xrkYbS9ZSAgU3j+U63Lq4VaC7x99EbQ4KpIh+3eLh3Ln78hazL3VzeEzxX/PO3/gVMCLczJGlaBHmeZlCzUE0/zMPdZMjlgxa8uZTiiGo7n44GDKrWE0dlf1YleF5p7gGtthP8RL8GC885HxUzg2mmLQrEYNU/5Y34ycCP+nGOPL/CQ+W4kBYyoJsRsiLROrA2WOCKae1qh57Uvh2hiCPCHp2C9w7FqwKbkDGpZ3AWHuX2v4TRqUYuP8NgtYdfSXchVoZmrA= X-Forefront-Antispam-Report: CIP:12.22.5.234;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230016)(4636009)(136003)(346002)(39860400002)(396003)(376002)(46966006)(36840700001)(40470700004)(5660300002)(82740400003)(356005)(2906002)(81166007)(41300700001)(4326008)(8676002)(70206006)(70586007)(36860700001)(82310400005)(186003)(4744005)(478600001)(316002)(8936002)(86362001)(40480700001)(40460700003)(7406005)(7416002)(9686003)(55016003)(26005)(47076005)(426003)(336012)(6916009)(54906003)(33716001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2022 15:54:51.5538 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e39b936a-f7f4-4c15-9020-08da5f67dccb X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.234];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0195 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 On Tue, Jul 05, 2022 at 11:56:25PM -0700, Christoph Hellwig wrote: > > - vfio_unpin_pages(&q->matrix_mdev->vdev, &q->saved_pfn, 1); > > + vfio_unpin_pages(&q->matrix_mdev->vdev, q->saved_pfn << PAGE_SHIFT, 1); > > Overly long line here. The following PATCH-5 drops the "<< PAGE_SHIFT", addressing this. To not wrapping and unwrapping a line back and forth, I think we are fine here? > Reviewed-by: Christoph Hellwig Will add to v3. Thanks for the review!