hisi_acc_vfio_pci: Add support for VFIO live migration
authorLongfang Liu <liulongfang@huawei.com>
Tue, 8 Mar 2022 18:49:01 +0000 (18:49 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 15 Mar 2022 17:41:32 +0000 (11:41 -0600)
commitb0eed085903e7758532696d64397901a75bba8ba
tree5aa3932142518009a6cf4ed190ce3aa1c0544d04
parent1e459b25081d4f939b8a1fb4c71dab0cec8f974a
hisi_acc_vfio_pci: Add support for VFIO live migration

VMs assigned with HiSilicon ACC VF devices can now perform live migration
if the VF devices are bind to the hisi_acc_vfio_pci driver.

Just like ACC PF/VF drivers this VFIO driver also make use of the HiSilicon
QM interface. QM stands for Queue Management which is a generic IP used by
ACC devices. It provides a generic PCIe interface for the CPU and the ACC
devices to share a group of queues.

QM integrated into an accelerator provides queue management service.
Queues can be assigned to PF and VFs, and queues can be controlled by
unified mailboxes and doorbells.

The QM driver (drivers/crypto/hisilicon/qm.c) provides generic
interfaces to ACC drivers to manage the QM.

Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Link: https://lore.kernel.org/r/20220308184902.2242-9-shameerali.kolothum.thodi@huawei.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/hisilicon/Kconfig
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.h [new file with mode: 0644]