lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y2UQnQjKFrHZ6PT4@nvidia.com>
Date:   Fri, 4 Nov 2022 10:16:13 -0300
From:   Jason Gunthorpe <jgg@...dia.com>
To:     liulongfang <liulongfang@...wei.com>
Cc:     Alex Williamson <alex.williamson@...hat.com>,
        shameerali.kolothum.thodi@...wei.com, john.garry@...wei.com,
        cohuck@...hat.com, linux-kernel@...r.kernel.org,
        linuxarm@...neuler.org, "kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] hisi_acc_vfio_pci: Add debugfs to migration driver

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@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ