hw/nvme: check maximum copy length (MCL) for COPY
authorMinwoo Im <minwoo.im@samsung.com>
Tue, 18 Apr 2023 00:26:22 +0000 (09:26 +0900)
committerKlaus Jensen <k.jensen@samsung.com>
Wed, 28 Jun 2023 09:13:42 +0000 (11:13 +0200)
commit381ab99d858709eab34b65d123a6356b8b1e87bd
tree22f3ec1e41bfeef9b46e2a27f91a05608b3c1836
parentcab1da59c2ff3bf08d0a7becf9b51e43a724a85c
hw/nvme: check maximum copy length (MCL) for COPY

MCL(Maximum Copy Length) in the Identify Namespace data structure limits
the number of LBAs to be copied inside of the controller.  We've not
checked it at all, so added the check with returning the proper error
status.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c