RE: [PATCH v12 vfio 4/7] vfio/pds: Add VFIO live migration support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Brett Creeley <bcreeley@xxxxxxx>
> Sent: Saturday, July 22, 2023 3:18 PM
> >> +
> >> +static struct pds_vfio_lm_file *
> >> +pds_vfio_get_lm_file(const struct file_operations *fops, int flags, u64
> size)
> >> +{
> >> +     struct pds_vfio_lm_file *lm_file = NULL;
> >> +     unsigned long long npages;
> >> +     struct page **pages;
> >> +     void *page_mem;
> >> +     const void *p;
> >> +
[...]
> >
> > I wonder whether the logic about migration file can be generalized.
> > It's not very maintainable to have every migration driver implementing
> > their own code for similar functions.
> >
> > Did I overlook any device specific setup required here?
> 
> There isn't device specific setup, but the other drivers were different
> enough that it wasn't a straight forward task. I think it might be
> possible to refactor the drivers to some common functionality here, but
> IMO this seems like a task that can be further explored once this series
> is merged.
> 

If there is no device specific setup I don't see a reason to further proliferate
the code duplication. At least it's an increasing review burden to me.

I'd like to hear opinions from other reviewers. 




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux