block/nvme: fix doorbell stride

Fix the math involving non standard doorbell stride

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20190716163020.13383-2-mlevitsk@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
Maxim Levitsky 2019-07-16 19:30:18 +03:00 committed by Max Reitz
parent 23da9e297b
commit 461bba04bf

View File

@ -217,7 +217,7 @@ static NVMeQueuePair *nvme_create_queue_pair(BlockDriverState *bs,
error_propagate(errp, local_err); error_propagate(errp, local_err);
goto fail; goto fail;
} }
q->cq.doorbell = &s->regs->doorbells[idx * 2 * s->doorbell_scale + 1]; q->cq.doorbell = &s->regs->doorbells[(idx * 2 + 1) * s->doorbell_scale];
return q; return q;
fail: fail: