[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 41/44] nvme: Fix get/set number of queues feature
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL v2 41/44] nvme: Fix get/set number of queues feature |
Date: |
Mon, 12 Jan 2015 16:40:31 +0000 |
From: Alex Friedman <address@hidden>
According to the specification, the low 16 bits should contain the number of
I/O submission queues, and the high 16 bits should contain the number of
I/O completion queues.
Signed-off-by: Alex Friedman <address@hidden>
Acked-by: Keith Busch <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/block/nvme.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index aa1ed98..4f70f91 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -476,7 +476,8 @@ static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeCmd *cmd,
NvmeRequest *req)
switch (dw10) {
case NVME_NUMBER_OF_QUEUES:
- req->cqe.result = cpu_to_le32(n->num_queues);
+ req->cqe.result =
+ cpu_to_le32((n->num_queues - 1) | ((n->num_queues - 1) << 16));
break;
default:
return NVME_INVALID_FIELD | NVME_DNR;
@@ -490,7 +491,8 @@ static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeCmd *cmd,
NvmeRequest *req)
switch (dw10) {
case NVME_NUMBER_OF_QUEUES:
- req->cqe.result = cpu_to_le32(n->num_queues);
+ req->cqe.result =
+ cpu_to_le32((n->num_queues - 1) | ((n->num_queues - 1) << 16));
break;
default:
return NVME_INVALID_FIELD | NVME_DNR;
--
2.1.0
- [Qemu-devel] [PULL v2 26/44] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD, (continued)
- [Qemu-devel] [PULL v2 26/44] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 36/44] coroutine: drop qemu_coroutine_adjust_pool_size, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 25/44] libqos: Add virtio MMIO support, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 21/44] libqos: Change use of pointers to uint64_t in virtio, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 24/44] libqos: Add malloc generic, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 39/44] block: Split BLOCK_OP_TYPE_COMMIT to BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET}, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 20/44] libqos: Convert malloc-pc allocator to a generic allocator, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 23/44] libqos: Remove PCI assumptions in constants of virtio driver, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 38/44] block: limited request size in write zeroes unsupported path, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 37/44] coroutine: try harder not to delete coroutines, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 41/44] nvme: Fix get/set number of queues feature,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL v2 40/44] ide: Implement VPD response for ATAPI, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 22/44] tests: Prepare virtio-blk-test for multi-arch implementation, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 42/44] MAINTAINERS: Update email addresses for Chrysostomos Nanakos, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 44/44] NVMe: Set correct VS Value for 1.1 Compliant Controllers, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 43/44] MAINTAINERS: Add migration/block* to block subsystem, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 27/44] .gitignore: Ignore generated "common.env", Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 01/44] qemu-iotests: Remove 091 from quick group, Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 28/44] qemu-iotests: Replace "/bin/true" with "true", Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 15/44] qmp: Add command 'blockdev-backup', Stefan Hajnoczi, 2015/01/12
- [Qemu-devel] [PULL v2 03/44] block: mark AioContext as recursive, Stefan Hajnoczi, 2015/01/12