Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp491867rwb; Tue, 29 Nov 2022 01:09:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf4KRoYas9/xaY30LArKx4ULH5ivtJpQkLo6MJADzev37hjt+nn30cK+xxo0CXXYQHre9O7c X-Received: by 2002:a63:f510:0:b0:478:1020:b1e6 with SMTP id w16-20020a63f510000000b004781020b1e6mr9134952pgh.561.1669712978517; Tue, 29 Nov 2022 01:09:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669712978; cv=none; d=google.com; s=arc-20160816; b=C3gQe9FSHlavNONuWTWdOnGdOX0o4kX3MelOdpu0xSDgrsY3pg/sUid0xgfIqhQkEt fziiJ3RNS3VJP+EHDiV8vbTZ4fMavwJY0wD39Som+nvuhcVLMEYNBGeth/wiD9WF/7cf 0V2S+0z7fiThPOMCPYxKPLpGxbw5JoCl7lxCjsBPy2BbZw+jcERxz+DnT/x65AXgz7r/ uXX2r6VARl5RmXxKrKc35cW1GjcH/xTlCspa+wdBvzkiZ9vFUqUfA/L3VRMdXwalr3UT CxOU+X2TFgFBHHL9fG/Ey3bCBLJuBLiDZT/tzKCOSYOWg2oLO/UFtEjV8MRPCTa0yqc6 v7Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=O1n1otUJ71QBvuaqT7wcEAGP0tF5OVncVjP1tMZ9oOQ=; b=0jIlDlWWA9QZZc4GOxnJn0ofgZ4++o4vxErHpBEe7Q1w8Y9KfG5524Hu6yNtI6ZEUR 5kTL7MRxd0QnFeWmkMZfsz+MwiHYwsIFP3ZXzrHvtARdzi6uj9ugHn7inDym+lCgQ2GM wimRV0qP8Wn6UHilWsNdFwO1kIBp0w62aDexmi2mlPqy/aWwjhrAdsiGcuTcKdRuuZQj GnTi0u/8JJpwSxCOqlTSUsIPvbDYAMpVngOkVtXt32cxBFFLRupRs6sfoD7yLH2fY+ta Y7xP06fRkPGvH66ZfoZedRf19ywEpGkYtwiyw5mj8ZLEgFj9IAHDln7URNK6WcFqyiwB S4cA== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020a654145000000b0045287c1978esi15414286pgp.402.2022.11.29.01.09.26; Tue, 29 Nov 2022 01:09:38 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230045AbiK2ImY (ORCPT + 83 others); Tue, 29 Nov 2022 03:42:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231326AbiK2Il6 (ORCPT ); Tue, 29 Nov 2022 03:41:58 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09DC27677 for ; Tue, 29 Nov 2022 00:41:57 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 4412468AFE; Tue, 29 Nov 2022 09:41:52 +0100 (CET) Date: Tue, 29 Nov 2022 09:41:51 +0100 From: Christoph Hellwig To: Lei Rao Cc: kbusch@kernel.org, axboe@fb.com, hch@lst.de, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] nvme: clear the prp2 field of the nvme command. Message-ID: <20221129084151.GA25609@lst.de> References: <20221129014711.91305-1-lei.rao@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221129014711.91305-1-lei.rao@intel.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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, Nov 29, 2022 at 09:47:11AM +0800, Lei Rao wrote: > If the prp2 field is not filled in nvme_setup_prp_simple(), the prp2 > field is garbage data. According to nvme spec, the prp2 is reserved if > the data transfer does not cross a memory page boundary. Writing a > reserved coded value into a controller property field produces undefined > results, so it needs to be cleared in nvme_setup_rw(). But this is not the right place to clear it, that needs to be done in the place that sets up the PRPs, і.e. nvme_setup_prp_simple.