From: Jason Gunthorpe <jgg@nvidia.com>
To: liulongfang <liulongfang@huawei.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
shameerali.kolothum.thodi@huawei.com, john.garry@huawei.com,
cohuck@redhat.com, linux-kernel@vger.kernel.org,
linuxarm@openeuler.org,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] hisi_acc_vfio_pci: Add debugfs to migration driver
Date: Fri, 4 Nov 2022 10:16:13 -0300 [thread overview]
Message-ID: <Y2UQnQjKFrHZ6PT4@nvidia.com> (raw)
In-Reply-To: <def63749-6005-8a67-8858-c5b0ff4f633d@huawei.com>
On Fri, Nov 04, 2022 at 11:22:51AM +0800, liulongfang wrote:
> On 2022/11/4 4:21, Alex Williamson wrote:
> > [Cc +kvm list]
> >
> > On Wed, 19 Oct 2022 16:10:32 +0800
> > Longfang Liu <liulongfang@huawei.com> wrote:
> >
> >> There are multiple devices, software and operational steps involved
> >> in the process of live migration. An error occurred on any node may
> >> cause the live migration operation to fail.
> >> This complex process makes it very difficult to locate and analyze
> >> the cause when the function fails.
> >>
> >> In order to quickly locate the cause of the problem when the
> >> live migration fails, I added a set of debugfs to the accelerator
> >> live migration driver.
> >>
> >> +-----------------------------------+
> >> | |
> >> | QEMU |
> >> | |
> >> +---+--^--------------------+--^----+
> >> | | | |
> >> | | | |
> >> +---v--+----+ +---v--+----+
> >> | | | |
> >> | src VF | | dest VF |
> >> | | | |
> >> +---+--^----+ +---+--^----+
> >> | | | |
> >> | | | |
> >> +---v--+----+ +---v--+----+
> >> | Debugfs | | Debugfs |
> >> +-----+-----+ +-----+-----+
> >> |state|debug| |state|debug|
> >> +-----+-----+ +-----+-----+
> >>
> >> This set of debugfs will create two files for each VF device:
> >> a state file and a debug file.
> >>
> >> The migration status of the current VF device can be obtained by
> >> reading the status file.
> >>
> >> The live migration function of the current device can be tested by
> >> operating the debug file, and the functional status of the equipment
> >> and software at each stage can be tested step by step without
> >> performing the complete live migration function. And after the live
> >> migration is performed, the migration device data of the live migration
> >> can be obtained through the debug file.
> >
> > This is proposed as an hisi_vfio_acc specific debugfs interface, but
> > common code could certainly implement much of this as well. Should we
> > have generic support for debugfs?
> >
>
> OK, I'd love to extend this part of the debugfs functionality into the
> vfio framework and make it a common debugfs functionality for all
> device drivers that use live migration.
Yeah, it is an interesting idea for sure
Jason
next prev parent reply other threads:[~2022-11-04 13:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 8:10 [PATCH v2 0/2] Add debugfs to hisilicon migration driver Longfang Liu
2022-10-19 8:10 ` [PATCH v2 1/2] hisi_acc_vfio_pci: Add debugfs to " Longfang Liu
2022-11-02 1:39 ` liulongfang
2022-11-03 20:21 ` Alex Williamson
2022-11-04 3:22 ` liulongfang
2022-11-04 13:16 ` Jason Gunthorpe [this message]
2022-10-19 8:10 ` [PATCH v2 2/2] Documentation: Add debugfs for hisi_acc_vfio_pci 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=Y2UQnQjKFrHZ6PT4@nvidia.com \
--to=jgg@nvidia.com \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=john.garry@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@openeuler.org \
--cc=liulongfang@huawei.com \
--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