lkml.org 
[lkml]   [2022]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v4 1/5] vfio/migration: Add debugfs to live migration driver
    From
    Date
    On 2022/12/2 23:17, Jason Gunthorpe wrote:
    > On Fri, Dec 02, 2022 at 05:26:21PM +0800, Longfang Liu wrote:
    >
    >> +static ssize_t vfio_pci_vf_state_read(struct file *filp, char __user *buffer,
    >> + size_t count, loff_t *pos)
    >> +{
    >
    > This would be better to use debugfs_create_devm_seqfile()
    >
    > Then you can simply use seq_printf()
    >

    The previous debugfs used this method in my patch.
    Is it now recommended to use the interface with "devm" ?


    >> @@ -119,6 +129,8 @@ struct vfio_migration_ops {
    >> enum vfio_device_mig_state *curr_state);
    >> int (*migration_get_data_size)(struct vfio_device *device,
    >> unsigned long *stop_copy_length);
    >> + int (*migration_get_data)(struct vfio_device *device, char *buffer);
    >> + int (*migration_get_attr)(struct vfio_device *device, char
    >> *buffer);
    >
    > Still no to passing through debugfs ops, create these files in the
    > driver.
    >

    If this part is also created and enabled in the device driver, why do we need
    to put this debugfs in the vfio public framework?

    Thanks,
    Longfang.
    > Jason
    > .
    >

    \
     
     \ /
      Last update: 2022-12-05 14:40    [W:4.285 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site