[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 22/25] block/nvme: Change size and alignment of queue
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 22/25] block/nvme: Change size and alignment of queue |
Date: |
Tue, 27 Oct 2020 14:55:44 +0100 |
From: Eric Auger <eric.auger@redhat.com>
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>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
block/nvme.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index ad70303c5c1..941f96b4c92 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;
--
2.26.2
- [PATCH 15/25] block/nvme: Correctly initialize Admin Queue Attributes, (continued)
- [PATCH 15/25] block/nvme: Correctly initialize Admin Queue Attributes, Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 18/25] block/nvme: Pass AioContext argument to nvme_add_io_queue(), Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 19/25] block/nvme: Set request_alignment at initialization, Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 20/25] block/nvme: Correct minimum device page size, Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 21/25] block/nvme: Change size and alignment of IDENTIFY response buffer, Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 22/25] block/nvme: Change size and alignment of queue,
Philippe Mathieu-Daudé <=
- [PATCH 23/25] block/nvme: Change size and alignment of prp_list_pages, Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 24/25] block/nvme: Align iov's va and size on host page size, Philippe Mathieu-Daudé, 2020/10/27
- [RFC PATCH 25/25] block/nvme: Fix use of write-only doorbells page on Aarch64 arch, Philippe Mathieu-Daudé, 2020/10/27
- Re: [PATCH 00/25] block/nvme: Fix Aarch64 host, Auger Eric, 2020/10/28