]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/nvme: fix invalid endian conversion
authorKlaus Jensen <k.jensen@samsung.com>
Thu, 22 Feb 2024 09:29:06 +0000 (10:29 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 27 Feb 2024 16:14:47 +0000 (19:14 +0300)
commitd3c3bc7a9c9700a9dfcaa3266ea830d73744fa9d
treeb9d8a556b7af72e0a73ba1911acb480ccfcae6a5
parenta15b7df35bf279b1328ee6b7939c8384aa1d364c
hw/nvme: fix invalid endian conversion

numcntl is one byte and so is max_vfs. Using cpu_to_le16 on big endian
hosts results in numcntl being set to 0.

Fix by dropping the endian conversion.

Fixes: 99f48ae7ae ("hw/nvme: Add support for Secondary Controller List")
Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Message-ID: <20240222-fix-sriov-numcntl-v1-1-d60bea5e72d0@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit d2b5bb860e6c17442ad95cc275feb07c1665be5c)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/nvme/ctrl.c