From: Klaus Jensen <k.jen...@samsung.com> If the device uses MSI-X, any of the 2048 MSI-X interrupt vectors are valid. If the device is not using MSI-X, vector will and can only be zero at this point.
Signed-off-by: Klaus Jensen <k.jen...@samsung.com> --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 2b072bbb21e7..755ced8b03fb 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -646,7 +646,7 @@ static uint16_t nvme_create_cq(NvmeCtrl *n, NvmeCmd *cmd) trace_nvme_err_invalid_create_cq_vector(vector); return NVME_INVALID_IRQ_VECTOR | NVME_DNR; } - if (unlikely(vector > n->num_queues)) { + if (unlikely(vector > PCI_MSIX_FLAGS_QSIZE)) { trace_nvme_err_invalid_create_cq_vector(vector); return NVME_INVALID_IRQ_VECTOR | NVME_DNR; } -- 2.26.2