aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/block/nvme.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 56ef07b..2addaf7 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -3997,8 +3997,10 @@ static int nvme_start_ctrl(NvmeCtrl *n)
n->zasl = n->params.mdts;
} else {
if (n->params.zasl_bs < n->page_size) {
- trace_pci_nvme_err_startfail_zasl_too_small(n->params.zasl_bs,
- n->page_size);
+ NVME_GUEST_ERR(pci_nvme_err_startfail_zasl_too_small,
+ "Zone Append Size Limit (ZASL) of %d bytes is too "
+ "small; must be at least %d bytes",
+ n->params.zasl_bs, n->page_size);
return -1;
}
n->zasl = 31 - clz32(n->params.zasl_bs / n->page_size);
@@ -4517,6 +4519,12 @@ static void nvme_check_constraints(NvmeCtrl *n, Error **errp)
error_setg(errp, "zone append size limit has to be a power of 2");
return;
}
+
+ if (n->params.zasl_bs < 4096) {
+ error_setg(errp, "zone append size limit must be at least "
+ "4096 bytes");
+ return;
+ }
}
}