]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/nvme: fix namespace atomic parameter setup
authorKlaus Jensen <k.jensen@samsung.com>
Tue, 4 Nov 2025 10:51:45 +0000 (11:51 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 25 Nov 2025 08:21:35 +0000 (09:21 +0100)
commit3050b349214568172776e3cc45c0455e42af741c
tree92b41225104e7e6076e0ba1338b03cc487ecd1c5
parentde074358e99b8eb5076d3efa267e44c292c90e3e
hw/nvme: fix namespace atomic parameter setup

Coverity complains about a possible copy-paste error in the verification
of the namespace atomic parameters (CID 1642811). While the check is
correct, the code (and the intention) is unclear.

Fix this by reworking how the parameters are verified. Peter also
identified that the realize function was not correctly erroring out if
parameters were misconfigured, so fix that too.

Lastly, change the error messages to be more describing.

Coverity: CID 1642811
Fixes: bce51b83709b ("hw/nvme: add atomic boundary support")
Fixes: 3b41acc96299 ("hw/nvme: enable ns atomic writes")
Reviewed-by: Jesper Wendel Devantier <foss@defmacro.it>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c
hw/nvme/ns.c
hw/nvme/nvme.h
include/block/nvme.h