[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] hw/nvme: Implement shadow doorbell buffer support
From: |
Jinhao Fan |
Subject: |
Re: [PATCH v2 1/2] hw/nvme: Implement shadow doorbell buffer support |
Date: |
Thu, 16 Jun 2022 19:37:50 +0800 |
> On Jun 16, 2022, at 6:40 PM, Klaus Jensen <its@irrelevant.dk> wrote:
>
> This wont work for drivers that *do* rely on updating the buffer for
> admin queues, so we should read it regardless of the value of the queue
> id (since we are now updating it through the "Keith Hack^TM").
Sure. Sorry I forgot to update this.
>
>> if (nvme_cq_full(cq)) {
>> break;
>> }
>> @@ -4237,6 +4248,7 @@ static uint16_t nvme_del_sq(NvmeCtrl *n, NvmeRequest
>> *req)
>> static void nvme_init_sq(NvmeSQueue *sq, NvmeCtrl *n, uint64_t dma_addr,
>> uint16_t sqid, uint16_t cqid, uint16_t size)
>> {
>> + uint32_t stride = 4 << NVME_CAP_DSTRD(n->bar.cap);
>
> You need to load the little endian value with ldq_le_p(&n->bar.cap).
> Sorry, didn't catch this in v1.
Thanks for pointing this out. Will send v3 soon.