diff options
author | Eric Auger <eric.auger@redhat.com> | 2020-10-29 10:33:01 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2020-11-03 19:06:22 +0000 |
commit | 2387aaced7209872238eaf594997009cffd5501d (patch) | |
tree | 78a2d689a1c430342db78d443f3111bfe6ce414c /block/nvme.c | |
parent | 0aecd06049ced6c0f863e99510b7a7cbff54aa56 (diff) | |
download | qemu-2387aaced7209872238eaf594997009cffd5501d.zip qemu-2387aaced7209872238eaf594997009cffd5501d.tar.gz qemu-2387aaced7209872238eaf594997009cffd5501d.tar.bz2 |
block/nvme: Change size and alignment of queue
In preparation of 64kB host page support, let's change the size
and alignment of the queue so that the VFIO DMA MAP succeeds.
We align on the host page size.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20201029093306.1063879-21-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Diffstat (limited to 'block/nvme.c')
-rw-r--r-- | block/nvme.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/nvme.c b/block/nvme.c index 7628623..4a8589d 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -167,9 +167,9 @@ static bool nvme_init_queue(BDRVNVMeState *s, NVMeQueue *q, size_t bytes; int r; - bytes = ROUND_UP(nentries * entry_bytes, s->page_size); + bytes = ROUND_UP(nentries * entry_bytes, qemu_real_host_page_size); q->head = q->tail = 0; - q->queue = qemu_try_memalign(s->page_size, bytes); + q->queue = qemu_try_memalign(qemu_real_host_page_size, bytes); if (!q->queue) { error_setg(errp, "Cannot allocate queue"); return false; |