Messages in this thread | | | From | Shameerali Kolothum Thodi <> | Subject | RE: [RFC v4 7/8] hisi_acc_vfio_pci: Add support for VFIO live migration | Date | Thu, 10 Feb 2022 15:07:40 +0000 |
| |
> -----Original Message----- > From: Alex Williamson [mailto:alex.williamson@redhat.com] > Sent: 09 February 2022 23:45 > To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com> > Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org; > linux-crypto@vger.kernel.org; jgg@nvidia.com; cohuck@redhat.com; > mgurtovoy@nvidia.com; yishaih@nvidia.com; Linuxarm > <linuxarm@huawei.com>; liulongfang <liulongfang@huawei.com>; Zengtao (B) > <prime.zeng@hisilicon.com>; Jonathan Cameron > <jonathan.cameron@huawei.com>; Wangzhou (B) <wangzhou1@hisilicon.com> > Subject: Re: [RFC v4 7/8] hisi_acc_vfio_pci: Add support for VFIO live > migration > > On Tue, 8 Feb 2022 13:34:24 +0000 > Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> wrote: > > + > > +static struct hisi_acc_vf_migration_file * > > +hisi_acc_vf_stop_copy(struct hisi_acc_vf_core_device *hisi_acc_vdev) > > +{ > > + struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm; > > + struct device *dev = &hisi_acc_vdev->vf_dev->dev; > > + struct hisi_acc_vf_migration_file *migf; > > + int ret; > > + > > + if (unlikely(qm_wait_dev_not_ready(vf_qm))) { > > + dev_info(dev, "QM device not ready, no data to transfer\n"); > > + return 0; > > + } > > This return value looks suspicious and I think would cause a segfault > in the calling code:
Ah..Right!. I think I can move the above to the vf_qm_state_save() and use migf->total_length to handle this.
Thanks, Shameer
| |