summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMaxim Levitsky2019-07-16 18:30:18 +0200
committerMax Reitz2019-07-22 18:40:32 +0200
commit461bba04bff0b3712a02fe49812b497c758e78da (patch)
tree793cc066d1b07018548051a51ebbdd887dfaedbf /block
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190722'... (diff)
downloadqemu-461bba04bff0b3712a02fe49812b497c758e78da.tar.gz
qemu-461bba04bff0b3712a02fe49812b497c758e78da.tar.xz
qemu-461bba04bff0b3712a02fe49812b497c758e78da.zip
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>
Diffstat (limited to 'block')
-rw-r--r--block/nvme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/nvme.c b/block/nvme.c
index 9896b7f7c6..82fdefccd6 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -217,7 +217,7 @@ static NVMeQueuePair *nvme_create_queue_pair(BlockDriverState *bs,
error_propagate(errp, local_err);
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;
fail: