qemu-e2k/hw/block
Dan Aloni cdd346371e nvme: Fix get/set number of queues feature, again
The number of queues that should be return by the admin command should:

  1) Only mention the number of non-admin queues.
  2) It is zero-based, meaning that '0 == one non-admin queue',
     '1 == two non-admin queues', and so forth.

Because our `num_queues` means the number of queues _plus_ the admin
queue, then the right calculation for the number returned from the admin
command is `num_queues - 2`, combining the two requirements mentioned.

The issue was discovered by reducing num_queues from 64 to 8 and running
a Linux VM with an SMP parameter larger than that (e.g. 22). It tries to
utilize all queues, and therefore fails with an invalid queue number
when trying to queue I/Os on the last queue.

Signed-off-by: Dan Aloni <dan@kernelim.com>
CC: Alex Friedman <alex@e8storage.com>
CC: Keith Busch <keith.busch@intel.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-29 16:54:40 +01:00
..
dataplane docs: fix broken paths to docs/devel/tracing.txt 2017-07-31 13:12:53 +03:00
block.c hw/block: Introduce share-rw qdev property 2017-02-28 20:40:36 +01:00
cdrom.c block: Clean up includes 2016-01-20 13:36:23 +01:00
ecc.c block: Clean up includes 2016-01-20 13:36:23 +01:00
fdc.c vmstate: error hint for failed equal checks 2017-06-28 11:18:44 +02:00
hd-geometry.c qemu-common: stop including qemu/bswap.h from qemu-common.h 2016-05-19 16:42:28 +02:00
m25p80.c hw/block: Request permissions 2017-02-28 20:40:36 +01:00
Makefile.objs xen: do not build backends for targets that do not support xen 2017-03-19 11:12:12 +01:00
nand.c hw/block: Request permissions 2017-02-28 20:40:36 +01:00
nvme.c nvme: Fix get/set number of queues feature, again 2017-08-29 16:54:40 +01:00
nvme.h nvme: Add support for Read Data and Write Data in CMBs. 2017-06-26 14:51:13 +02:00
onenand.c memory: Rename memory_region_init_ram() to memory_region_init_ram_nomigrate() 2017-07-14 17:59:42 +01:00
pflash_cfi01.c hw/block/pflash_cfi01, pflash_cfi02: Use memory_region_init_rom_device() 2017-07-14 17:59:42 +01:00
pflash_cfi02.c hw/block/pflash_cfi01, pflash_cfi02: Use memory_region_init_rom_device() 2017-07-14 17:59:42 +01:00
tc58128.c block: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
trace-events docs: fix broken paths to docs/devel/tracing.txt 2017-07-31 13:12:53 +03:00
virtio-blk.c virtio-blk: handle blk_getlength() errors 2017-08-10 14:33:43 +01:00
xen_blkif.h xen: import ring.h from xen 2017-04-21 12:41:29 -07:00
xen_disk.c xen-disk: add support for multi-page shared rings 2017-06-27 15:01:56 -07:00