lkml.org 
[lkml]   [2022]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC v4 7/8] hisi_acc_vfio_pci: Add support for VFIO live migration
Date


> -----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


\
 
 \ /
  Last update: 2022-02-10 16:08    [W:0.077 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site