hw/block/nvme: improve invalid zasl value reporting
commit2c7e2ad243b92f02555498392fb4ce761db8ceb3
authorKlaus Jensen <k.jensen@samsung.com>
Mon, 8 Feb 2021 08:19:41 +0000 (8 09:19 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 9 Mar 2021 10:00:57 +0000 (9 11:00 +0100)
tree4cb320d747bb61e2fb5db95e1a792c9e9e96cfc8
parent9ae390046164e8b62fbdc48d2c6de8ee6fbd3cdc
hw/block/nvme: improve invalid zasl value reporting

The Zone Append Size Limit (ZASL) must be at least 4096 bytes, so
improve the user experience by adding an early parameter check in
nvme_check_constraints.

When ZASL is still too small due to the host configuring the device for
an even larger page size, convert the trace point in nvme_start_ctrl to
an NVME_GUEST_ERR such that this is logged by QEMU instead of only
traced.

Reported-by: Corne <info@dantalion.nl>
Cc: Dmitry Fomichev <Dmitry.Fomichev@wdc.com>
Reviewed-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/block/nvme.c