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