[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: |
Wed, 1 Feb 2017 12:29:22 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
On 01/02/2017 08:40, Stefan Hajnoczi wrote:
>> + range = g_new(NvmeDsmRange, nr);
>> +
>> + if (nvme_map_prp(&qsg, le64_to_cpu(cmd->prp1), le64_to_cpu(cmd->prp2),
>> + sizeof(range), n)) {
This should be sizeof(*range) * nr, like the DMA below.
>> + 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)?
Paolo