[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] nvme: implement the DSM comman
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] nvme: implement the DSM command |
Date: |
Thu, 2 Feb 2017 07:04:21 -0500 (EST) |
> On Wed, Feb 01, 2017 at 12:29:22PM -0800, Paolo Bonzini wrote:
> > On 01/02/2017 08:40, Stefan Hajnoczi wrote:
> > >> + goto out_free_range;
> > >> + }
> > >> +
> > >> + if (dma_buf_write((uint8_t *)range, sizeof(range), &qsg)) {
> > >
> > > Did you mean sizeof(*range) * nr?
> >
> > Did you also mean dma_buf_read (you want to read from device to range)?
>
> uint64_t dma_buf_write(uint8_t *ptr, int32_t len, QEMUSGList *sg)
> {
> return dma_buf_rw(ptr, len, sg, DMA_DIRECTION_TO_DEVICE);
> }
>
> DMA_DIRECTION_TO_DEVICE seems correct.
Yes, it is.
Paolo