summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Fomichev2021-01-18 04:39:17 +0100
committerKlaus Jensen2021-02-08 21:15:53 +0100
commitadd961300c8e29167465fe8206539c4e6bffde28 (patch)
tree723213bbef4f83297cd89c7bee67015147c57fff
parenthw/block/nvme: remove unnecessary check for append (diff)
downloadqemu-add961300c8e29167465fe8206539c4e6bffde28.tar.gz
qemu-add961300c8e29167465fe8206539c4e6bffde28.tar.xz
qemu-add961300c8e29167465fe8206539c4e6bffde28.zip
hw/block/nvme: Correct error status for unaligned ZA
TP 4053 says (in section 2.3.1.1) - ... if a Zone Append command specifies a ZSLBA that is not the lowest logical block address in that zone, then the controller shall abort that command with a status code of Invalid Field In Command. In the code, Zone Invalid Write is returned instead, fix this. Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
-rw-r--r--hw/block/nvme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index c73afdf805..35f39ecd95 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -1150,7 +1150,7 @@ static uint16_t nvme_check_zone_write(NvmeCtrl *n, NvmeNamespace *ns,
if (append) {
if (unlikely(slba != zone->d.zslba)) {
trace_pci_nvme_err_append_not_at_start(slba, zone->d.zslba);
- status = NVME_ZONE_INVALID_WRITE;
+ status = NVME_INVALID_FIELD;
}
if (nvme_l2b(ns, nlb) > (n->page_size << n->zasl)) {
trace_pci_nvme_err_append_too_large(slba, nlb, n->zasl);