[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220304134014.32ba4360.alex.williamson@redhat.com>
Date: Fri, 4 Mar 2022 13:40:14 -0700
From: Alex Williamson <alex.williamson@...hat.com>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>
Cc: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"jgg@...dia.com" <jgg@...dia.com>,
"cohuck@...hat.com" <cohuck@...hat.com>,
"mgurtovoy@...dia.com" <mgurtovoy@...dia.com>,
"yishaih@...dia.com" <yishaih@...dia.com>,
liulongfang <liulongfang@...wei.com>,
"Zengtao (B)" <prime.zeng@...ilicon.com>,
Jonathan Cameron <jonathan.cameron@...wei.com>,
"Wangzhou (B)" <wangzhou1@...ilicon.com>,
Linuxarm <linuxarm@...wei.com>
Subject: Re: [PATCH v8 8/9] hisi_acc_vfio_pci: Add support for VFIO live
migration
On Fri, 4 Mar 2022 20:36:24 +0000
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com> wrote:
> > -----Original Message-----
> > From: Alex Williamson [mailto:alex.williamson@...hat.com]
> > Sent: 04 March 2022 19:44
> > To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>
> > Cc: kvm@...r.kernel.org; linux-kernel@...r.kernel.org;
> > linux-crypto@...r.kernel.org; linux-pci@...r.kernel.org; jgg@...dia.com;
> > cohuck@...hat.com; mgurtovoy@...dia.com; yishaih@...dia.com;
> > liulongfang <liulongfang@...wei.com>; Zengtao (B)
> > <prime.zeng@...ilicon.com>; Jonathan Cameron
> > <jonathan.cameron@...wei.com>; Wangzhou (B) <wangzhou1@...ilicon.com>
> > Subject: Re: [PATCH v8 8/9] hisi_acc_vfio_pci: Add support for VFIO live
> > migration
> >
> > On Fri, 4 Mar 2022 08:48:27 +0000
> > Shameerali Kolothum Thodi <shameerali.kolothum.thodi@...wei.com>
> > wrote:
> >
> > > Hi Alex,
> > >
> > > > -----Original Message-----
> > > > From: Shameerali Kolothum Thodi
> > > > Sent: 03 March 2022 23:02
> > > > To: kvm@...r.kernel.org; linux-kernel@...r.kernel.org;
> > > > linux-crypto@...r.kernel.org
> > > > Cc: linux-pci@...r.kernel.org; alex.williamson@...hat.com;
> > jgg@...dia.com;
> > > > cohuck@...hat.com; mgurtovoy@...dia.com; yishaih@...dia.com;
> > Linuxarm
> > > > <linuxarm@...wei.com>; liulongfang <liulongfang@...wei.com>;
> > Zengtao (B)
> > > > <prime.zeng@...ilicon.com>; Jonathan Cameron
> > > > <jonathan.cameron@...wei.com>; Wangzhou (B)
> > <wangzhou1@...ilicon.com>
> > > > Subject: [PATCH v8 8/9] hisi_acc_vfio_pci: Add support for VFIO live
> > migration
> > > >
> > > > From: Longfang Liu <liulongfang@...wei.com>
> > > >
> > > > 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.
> > > >
> > > > Signed-off-by: Longfang Liu <liulongfang@...wei.com>
> > > > Signed-off-by: Shameer Kolothum
> > <shameerali.kolothum.thodi@...wei.com>
> > >
> > > [...]
> > > > +
> > > > +static int vf_qm_check_match(struct hisi_acc_vf_core_device
> > *hisi_acc_vdev,
> > > > + struct hisi_acc_vf_migration_file *migf) {
> > > > + struct acc_vf_data *vf_data = &migf->vf_data;
> > > > + struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm;
> > > > + struct hisi_qm *pf_qm = &hisi_acc_vdev->vf_qm;
> > >
> > > Oops, the above has to be,
> > > struct hisi_qm *pf_qm = hisi_acc_vdev->pf_qm;
> > >
> > > This was actually fixed in v6, but now that I rebased mainly to v5, missed it.
> > > Please let me know if you want a re-spin with the above fix(in case there are
> > no further
> > > comments) or this is something you can take care.
> >
> > To confirm, you're looking for this change:
> >
> > diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> > b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> > index aa2e4b6bf598..f2a0c046413f 100644
> > --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> > +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> > @@ -413,7 +413,7 @@ static int vf_qm_check_match(struct
> > hisi_acc_vf_core_device *hisi_acc_vdev,
> > {
> > struct acc_vf_data *vf_data = &migf->vf_data;
> > struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm;
> > - struct hisi_qm *pf_qm = &hisi_acc_vdev->vf_qm;
> > + struct hisi_qm *pf_qm = &hisi_acc_vdev->pf_qm;
> > struct device *dev = &vf_qm->pdev->dev;
> > u32 que_iso_state;
> > int ret;
> >
> > Right?
>
> Not really. pf_qm is a pointer. This is the change,
>
> diff --git a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> index 53e4c5cb3a71..54813772a071 100644
> --- a/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> +++ b/drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.c
> @@ -413,7 +413,7 @@ static int vf_qm_check_match(struct hisi_acc_vf_core_device *hisi_acc_vdev,
> {
> struct acc_vf_data *vf_data = &migf->vf_data;
> struct hisi_qm *vf_qm = &hisi_acc_vdev->vf_qm;
> - struct hisi_qm *pf_qm = &hisi_acc_vdev->vf_qm;
> + struct hisi_qm *pf_qm = hisi_acc_vdev->pf_qm;
> struct device *dev = &vf_qm->pdev->dev;
> u32 que_iso_state;
> int ret;
>
Got it. Thanks,
Alex
Powered by blists - more mailing lists