qemu/hw/nvme
John Berg bc432bc522 hw/nvme: Add support for setting the MQES for the NVMe emulation
The MQES field in the CAP register describes the Maximum Queue Entries
Supported for the IO queues of an NVMe controller. Adding a +1 to the
value in this field results in the total queue size. A full queue is
when a queue of size N contains N - 1 entries, and the minimum queue
size is 2. Thus the lowest MQES value is 1.

This patch adds the new mqes property to the NVMe emulation which allows
a user to specify the maximum queue size by setting this property. This
is useful as it enables testing of NVMe controller where the MQES is
relatively small. The smallest NVMe queue size supported in NVMe is 2
submission and completion entries, which means that the smallest legal
mqes value is 1.

The following example shows how the mqes can be set for a the NVMe
emulation:

-drive id=nvme0,if=none,file=nvme.img,format=raw
-device nvme,drive=nvme0,serial=foo,mqes=1

If the mqes property is not provided then the default mqes will still be
0x7ff (the queue size is 2048 entries).

Signed-off-by: John Berg <jhnberg@amazon.co.uk>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
2024-07-11 17:05:37 +02:00
..
ctrl.c hw/nvme: Add support for setting the MQES for the NVMe emulation 2024-07-11 17:05:37 +02:00
dif.c hw/nvme: fix CRC64 for guard tag 2023-08-08 08:09:38 +02:00
dif.h hw/nvme: 64-bit pi support 2022-03-03 09:30:21 +01:00
Kconfig kconfig: Add NVME to s390x machines 2023-09-12 12:07:16 +02:00
meson.build hw/nvme: Add NVMe NGUID property 2024-03-12 15:48:56 +01:00
nguid.c hw/nvme: Add NVMe NGUID property 2024-03-12 15:48:56 +01:00
ns.c hw/nvme: Add NVMe NGUID property 2024-03-12 15:48:56 +01:00
nvme.h hw/nvme: Add support for setting the MQES for the NVMe emulation 2024-07-11 17:05:37 +02:00
subsys.c hw/nvme: fix verification of number of ruhis 2023-06-28 11:22:17 +02:00
trace-events hw/nvme: fix compliance issue wrt. iosqes/iocqes 2023-08-07 12:27:24 +02:00
trace.h