From: liulongfang <liulongfang@huawei.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: <alex.williamson@redhat.com>,
<shameerali.kolothum.thodi@huawei.com>, <john.garry@huawei.com>,
<cohuck@redhat.com>, <linux-kernel@vger.kernel.org>,
<linuxarm@openeuler.org>
Subject: Re: [PATCH v4 1/5] vfio/migration: Add debugfs to live migration driver
Date: Mon, 5 Dec 2022 21:39:29 +0800 [thread overview]
Message-ID: <f17dfd5d-3d65-d51e-426a-e60f7e99a3d6@huawei.com> (raw)
In-Reply-To: <Y4oW/ToMZEUnlYZ1@nvidia.com>
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
> .
>
next prev parent reply other threads:[~2022-12-05 13:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 9:26 [PATCH v4 0/5] add debugfs to migration driver Longfang Liu
2022-12-02 9:26 ` [PATCH v4 1/5] vfio/migration: Add debugfs to live " Longfang Liu
2022-12-02 10:02 ` Shameerali Kolothum Thodi
2022-12-05 13:42 ` liulongfang
2022-12-02 15:17 ` Jason Gunthorpe
2022-12-05 13:39 ` liulongfang [this message]
2022-12-05 13:55 ` Jason Gunthorpe
2022-12-08 8:40 ` liulongfang
2022-12-02 9:26 ` [PATCH v4 2/5] hisi_acc_vfio_pci: extract public functions for container_of Longfang Liu
2022-12-02 9:26 ` [PATCH v4 3/5] hisi_acc_vfio_pci: register debugfs for hisilicon migration driver Longfang Liu
2022-12-02 15:21 ` Jason Gunthorpe
2022-12-05 13:44 ` liulongfang
2022-12-09 8:41 ` liulongfang
2022-12-17 6:42 ` liulongfang
2022-12-02 9:26 ` [PATCH v4 4/5] Documentation: add debugfs description for hisi_acc_vfio_pci Longfang Liu
2022-12-02 9:26 ` [PATCH v4 5/5] vfio: update live migration device status Longfang Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f17dfd5d-3d65-d51e-426a-e60f7e99a3d6@huawei.com \
--to=liulongfang@huawei.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=jgg@nvidia.com \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@openeuler.org \
--cc=shameerali.kolothum.thodi@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox