From: "Heitke, Kenneth" <kenneth.heitke@intel.com>
To: Klaus Birkelund Jensen <klaus@birkelund.eu>, qemu-block@nongnu.org
Cc: Keith Busch <keith.busch@intel.com>,
Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] nvme: fix copy direction in DMA reads going to CMB
Date: Sat, 18 May 2019 11:56:39 -0600 [thread overview]
Message-ID: <ee4de9a0-2cfb-c2f3-fabb-d91a07daf7bf@intel.com> (raw)
In-Reply-To: <20190518073905.17178-1-klaus@birkelund.eu>
On 5/18/2019 1:39 AM, Klaus Birkelund Jensen wrote:
> `nvme_dma_read_prp` erronously used `qemu_iovec_*to*_buf` instead of
> `qemu_iovec_*from*_buf` when the request involved the controller memory
> buffer.
>
> Signed-off-by: Klaus Birkelund Jensen <klaus.jensen@cnexlabs.com>
> ---
> hw/block/nvme.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/block/nvme.c b/hw/block/nvme.c
> index 7caf92532a09..63a5b58849fb 100644
> --- a/hw/block/nvme.c
> +++ b/hw/block/nvme.c
> @@ -238,7 +238,7 @@ static uint16_t nvme_dma_read_prp(NvmeCtrl *n, uint8_t *ptr, uint32_t len,
> }
> qemu_sglist_destroy(&qsg);
> } else {
> - if (unlikely(qemu_iovec_to_buf(&iov, 0, ptr, len) != len)) {
> + if (unlikely(qemu_iovec_from_buf(&iov, 0, ptr, len) != len)) {
> trace_nvme_err_invalid_dma();
> status = NVME_INVALID_FIELD | NVME_DNR;
> }
>
Reviewed-by: Kenneth Heitke <kenneth.heitke@intel.com>
next prev parent reply other threads:[~2019-05-18 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-18 7:39 [Qemu-devel] [PATCH] nvme: fix copy direction in DMA reads going to CMB Klaus Birkelund Jensen
2019-05-18 17:56 ` Heitke, Kenneth [this message]
2019-05-20 10:11 ` Kevin Wolf
2019-05-20 15:05 ` Keith Busch
2019-05-20 17:56 ` Klaus Birkelund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ee4de9a0-2cfb-c2f3-fabb-d91a07daf7bf@intel.com \
--to=kenneth.heitke@intel.com \
--cc=keith.busch@intel.com \
--cc=klaus@birkelund.eu \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).