]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hisi_acc_vfio_pci: fix the queue parameter anomaly issue
authorLongfang Liu <liulongfang@huawei.com>
Thu, 22 Jan 2026 02:02:05 +0000 (10:02 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:34 +0000 (07:20 -0500)
commit6f0777606a41e1f596b56a076b8700d4bcd98333
treeb935ac5c223e5fe3e7d1d2f65ff06d087565b20c
parentda3b7fbe1acd6c28a4d07165d55e2c46e7bf9deb
hisi_acc_vfio_pci: fix the queue parameter anomaly issue

[ Upstream commit c3cbc276c2a33b04fc78a86cdb2ddce094cb3614 ]

When the number of QPs initialized by the device, as read via vft, is zero,
it indicates either an abnormal device configuration or an abnormal read
result.
Returning 0 directly in this case would allow the live migration operation
to complete successfully, leading to incorrect parameter configuration after
migration and preventing the service from recovering normal functionality.
Therefore, in such situations, an error should be returned to roll back the
live migration operation.

Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Link: https://lore.kernel.org/r/20260122020205.2884497-5-liulongfang@huawei.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c