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 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE635C04AAF for ; Sat, 18 May 2019 07:36:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A80A62087E for ; Sat, 18 May 2019 07:36:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A80A62087E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=birkelund.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:58878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRttN-0003K4-CW for qemu-devel@archiver.kernel.org; Sat, 18 May 2019 03:36:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRtsV-0002rq-1J for qemu-devel@nongnu.org; Sat, 18 May 2019 03:35:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRtsT-0004M4-TA for qemu-devel@nongnu.org; Sat, 18 May 2019 03:35:35 -0400 Received: from charlie.dont.surf ([128.199.63.193]:43016) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRtnb-00036W-GC; Sat, 18 May 2019 03:30:31 -0400 Received: from apples.localdomain (ip-5-186-120-196.cgn.fibianet.dk [5.186.120.196]) by charlie.dont.surf (Postfix) with ESMTPSA id 997FEBF659; Sat, 18 May 2019 07:30:28 +0000 (UTC) Date: Sat, 18 May 2019 09:30:25 +0200 From: Klaus Birkelund To: "Heitke, Kenneth" Message-ID: <20190518073024.GA16611@apples.localdomain> Mail-Followup-To: "Heitke, Kenneth" , qemu-block@nongnu.org, keith.busch@intel.com, kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com References: <20190405214117.1850-1-kenneth.heitke@intel.com> <20190514060225.GA1350@apples.localdomain> <1f607df5-b523-e517-c439-392725fd441b@intel.com> <20190517053504.GA17341@apples.localdomain> <20190517062442.GB17341@apples.localdomain> <78248b8b-2684-409a-1e33-77b4c0907cd6@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78248b8b-2684-409a-1e33-77b4c0907cd6@intel.com> User-Agent: Mutt/1.11.4 (2019-03-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 128.199.63.193 Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] nvme: add Get/Set Feature Timestamp support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: keith.busch@intel.com, kwolf@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Fri, May 17, 2019 at 07:49:18PM -0600, Heitke, Kenneth wrote: > > > > > > + if (qemu_iovec_from_buf(&iov, 0, ptr, len) != len) { > > > > > > > > > > This should be `qemu_iovec_to_buf`. > > > > > > > > > > > > > This function is transferring data from the "host" to the device so I > > > > believe I am using the correct function. > > > > > > > > > > Exactly, but this means that you need to populate `ptr` with data > > > described by the prps, hence dma_buf_*write* and qemu_iovec_*to*_buf. In > > > this case `ptr` is set to the address of the uint64_t timestamp, and > > > that is what we need to write to. > > > > > > > I was going to argue with the fact that nvme_dma_read_prp uses > > qemu_iovec_from_buf. But it uses _to_buf which as far as I can tell is > > also wrong. > > > > Okay, I'm onboard. You're correct. I'll update my patch and re-submit. I can > also submit a patch to fix nvme_dma_read_prp() unless you or someone else > wants to. > Hi Kenneth, The `nvme_dma_read_prp` case is actually already fixed in one of the patches I sent yesterday ("nvme: simplify PRP mappings"), but I'll submit it as a separate patch. Cheers