]> xenbits.xensource.com Git - qemu-xen.git/commit
hw/nvme: fix compliance issue wrt. iosqes/iocqes
authorKlaus Jensen <k.jensen@samsung.com>
Wed, 19 Jul 2023 18:21:58 +0000 (20:21 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 10 Sep 2023 16:39:41 +0000 (19:39 +0300)
commitcbd3c5db76f0c91ec092692b3ace2727403e4954
tree95e150686da92295d93969b899e41040c345f0d0
parentdd496f92b97a9a2d36f83a91d8adae90ba65465a
hw/nvme: fix compliance issue wrt. iosqes/iocqes

As of prior to this patch, the controller checks the value of CC.IOCQES
and CC.IOSQES prior to enabling the controller. As reported by Ben in
GitLab issue #1691, this is not spec compliant. The controller should
only check these values when queues are created.

This patch moves these checks to nvme_create_cq(). We do not need to
check it in nvme_create_sq() since that will error out if the completion
queue is not already created.

Also, since the controller exclusively supports SQEs of size 64 bytes
and CQEs of size 16 bytes, hard code that.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1691
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
(cherry picked from commit 6a33f2e920ec0b489a77200888e3692664077f2d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/nvme/ctrl.c
hw/nvme/nvme.h
hw/nvme/trace-events