Skip to content

fix two issues in hisi_acc_vfio_pci driver

Longfang Liu kvm lkml 6 versions – Applied

Status from this message: Applied to vfio next branch for v7.4. Thanks,

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 1 replyApplied
  2. v52 patches 2 repliesSuperseded
  3. v42 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches9 repliesSuperseded
v22 patches1 replySuperseded
v12 patches6 repliesSuperseded

Changes in v6 from the cover letter

- Fix a potential NULL dereference in reset_prepare(). Open code &qm->pdev->dev at dev_err() to drop the local variable evaluated before the mig_ops check.

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/2hisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF passthroughdrivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c+9 -50 replies
2/2hisi_acc_vfio_pci: reject live migration on 64KB page with QM_HW_V3 hardwaredrivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c+20 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.

Read the v6 thread

Cover letter [PATCH v6 0/2] fix two issues in hisi_acc_vfio_pci driver

This series fixes two issues in the HiSilicon ACC VFIO PCI driver:
1. A NULL pointer dereference in reset_prepare() when a PF is bound to the driver and passed through to a VM.
2. A 64KB page incompatibility on QM_HW_V3 hardware that breaks migration and the guest kernel.

Changes since v5:
- Fix a potential NULL dereference in reset_prepare(). Open code &qm->pdev->dev at dev_err() to drop the local variable evaluated before the mig_ops check.

Changes since v4:
- Removed dev_err() log from reset_prepare().
- Removed redundant pdev->is_virtfn check from probe().

Changes since v3:
- Merged the set_reset_flag fix into patch 1 (was a separate patch in v3)
- Replaced pf_qm guards with a mig_ops check at function entry.
- Moved the 64KB page check from open_device to probe, selecting generic ops instead of rejecting the device.

Changes since v2:
- Remove redundant qm->io_base check.
- Drop PAGE_ALIGN for BAR2 configuration region.

Longfang Liu (2):
hisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF
passthrough
hisi_acc_vfio_pci: reject live migration on 64KB page with QM_HW_V3
hardware

 drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c | 46 ++++++++++++-------
 1 file changed, 29 insertions(+), 17 deletions(-)
Signature · 1 line
2.43.0