]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hisi_acc_vfio_pci: fix XQE dma address error
authorLongfang Liu <liulongfang@huawei.com>
Sat, 10 May 2025 08:11:50 +0000 (16:11 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 19 May 2025 18:41:31 +0000 (12:41 -0600)
commit8bb7170c5a055ea17c6857c256ee73c10ff872eb
treeebedd057509451e471a56743fc86a054fb5f9a9f
parent07970d048cddeb56fa17925d7c37cb2400322aab
hisi_acc_vfio_pci: fix XQE dma address error

The dma addresses of EQE and AEQE are wrong after migration and
results in guest kernel-mode encryption services  failure.
Comparing the definition of hardware registers, we found that
there was an error when the data read from the register was
combined into an address. Therefore, the address combination
sequence needs to be corrected.

Even after fixing the above problem, we still have an issue
where the Guest from an old kernel can get migrated to
new kernel and may result in wrong data.

In order to ensure that the address is correct after migration,
if an old magic number is detected, the dma address needs to be
updated.

Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration")
Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Reviewed-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Link: https://lore.kernel.org/r/20250510081155.55840-2-liulongfang@huawei.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.h