aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorKlaus Jensen <k.jensen@samsung.com>2021-08-23 14:11:33 +0200
committerKlaus Jensen <k.jensen@samsung.com>2021-09-24 08:31:35 +0200
commitfd761337aca5b55c133c3bec1b8bd4471cb9571a (patch)
tree3ca7dd5bc1a920c4650392034c88f1c30797057b /hw
parent2c3e83f92d93fbab071b8a96b8ab769b01902475 (diff)
downloadqemu-fd761337aca5b55c133c3bec1b8bd4471cb9571a.zip
qemu-fd761337aca5b55c133c3bec1b8bd4471cb9571a.tar.gz
qemu-fd761337aca5b55c133c3bec1b8bd4471cb9571a.tar.bz2
hw/nvme: fix validation of ASQ and ACQ
Address 0x0 is a valid address. Fix the admin submission and completion queue address validation to not error out on this. Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/nvme/ctrl.c8
-rw-r--r--hw/nvme/trace-events2
2 files changed, 0 insertions, 10 deletions
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 6baf9e0..ff78485 100644
--- a/hw/nvme/ctrl.c
+++ b/hw/nvme/ctrl.c
@@ -5623,14 +5623,6 @@ static int nvme_start_ctrl(NvmeCtrl *n)
trace_pci_nvme_err_startfail_sq();
return -1;
}
- if (unlikely(!asq)) {
- trace_pci_nvme_err_startfail_nbarasq();
- return -1;
- }
- if (unlikely(!acq)) {
- trace_pci_nvme_err_startfail_nbaracq();
- return -1;
- }
if (unlikely(asq & (page_size - 1))) {
trace_pci_nvme_err_startfail_asq_misaligned(asq);
return -1;
diff --git a/hw/nvme/trace-events b/hw/nvme/trace-events
index 430eeb3..ff6cafd 100644
--- a/hw/nvme/trace-events
+++ b/hw/nvme/trace-events
@@ -159,8 +159,6 @@ pci_nvme_err_invalid_setfeat(uint32_t dw10) "invalid set features, dw10=0x%"PRIx
pci_nvme_err_invalid_log_page(uint16_t cid, uint16_t lid) "cid %"PRIu16" lid 0x%"PRIx16""
pci_nvme_err_startfail_cq(void) "nvme_start_ctrl failed because there are non-admin completion queues"
pci_nvme_err_startfail_sq(void) "nvme_start_ctrl failed because there are non-admin submission queues"
-pci_nvme_err_startfail_nbarasq(void) "nvme_start_ctrl failed because the admin submission queue address is null"
-pci_nvme_err_startfail_nbaracq(void) "nvme_start_ctrl failed because the admin completion queue address is null"
pci_nvme_err_startfail_asq_misaligned(uint64_t addr) "nvme_start_ctrl failed because the admin submission queue address is misaligned: 0x%"PRIx64""
pci_nvme_err_startfail_acq_misaligned(uint64_t addr) "nvme_start_ctrl failed because the admin completion queue address is misaligned: 0x%"PRIx64""
pci_nvme_err_startfail_page_too_small(uint8_t log2ps, uint8_t maxlog2ps) "nvme_start_ctrl failed because the page size is too small: log2size=%u, min=%u"