]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/nvme: fix invalid check on mcl
authorKlaus Jensen <k.jensen@samsung.com>
Thu, 8 Feb 2024 12:22:48 +0000 (13:22 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Tue, 12 Mar 2024 14:48:56 +0000 (15:48 +0100)
commit8c78015a55d84c016da6d5e41b6b5f618ecb25ab
treed476565068b98bbfd7169e041f0ae722a4c9ce00
parent4f0a4a3d5854824e5c5eccf353d4a1f4f749a29d
hw/nvme: fix invalid check on mcl

The number of logical blocks within a source range is converted into a
1s based number at the time of parsing. However, when verifying the copy
length we add one again, causing the check against MCL to fail in error.

Cc: qemu-stable@nongnu.org
Fixes: 381ab99d8587 ("hw/nvme: check maximum copy length (MCL) for COPY")
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c