RE: [PATCH 4/4] virtio_pci: Support surprise removal of virtio pci device

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

 




> From: Michael S. Tsirkin <mst@xxxxxxxxxx>
> Sent: Monday, July 19, 2021 5:37 PM
> 
> On Mon, Jul 19, 2021 at 05:44:49AM +0000, Parav Pandit wrote:
> >
> >
> > > From: Michael S. Tsirkin <mst@xxxxxxxxxx>
> > > Sent: Sunday, July 18, 2021 2:17 AM
> > >
> > > On Sat, Jul 17, 2021 at 10:42:58AM +0300, Parav Pandit wrote:
> > > > When a virtio pci device undergo surprise removal (aka async
> > > > removaln in
> > >
> > > typo
> > Fixing it. Checkpatch.pl and codespell, both didn't catch it. 😊
> >
> > >
> > > OK that's nice, but I suspect this is not enough.
> > > For example we need to also fix up all config space reads to handle
> > > all-ones patterns specially.
> > >
> > > E.g.
> > >
> > >         /* After writing 0 to device_status, the driver MUST wait for a read of
> > >          * device_status to return 0 before reinitializing the device.
> > >          * This will flush out the status write, and flush in device writes,
> > >          * including MSI-X interrupts, if any.
> > >          */
> > >         while (vp_modern_get_status(mdev))
> > >                 msleep(1);
> > >
> > > lots of code in drivers needs to be fixed too.
> > Above one particularly known to us in the hot plug area.
> > Above fix is needed to close the race of hot plug and unplug happening in
> parallel, which is occurring today, but less common.
> > It is in my todo list to fix it.
> > Will take care of it in near future in other series.
> >
> > >
> > > I guess we need to annotate drivers somehow to mark up whether they
> > > support surprise removal? And maybe find a way to let host know?
> > What is the benefit of it? Who can make use of that information?
> 
> For example, host could avoid removing devices by hot removal if guest is
> not ready for it. Or libosinfo could use that to tell users what to do.
Not sure how to achieve it. Because this is decided by the pci hot plug driver at bit early stage.
And pci hot plug slot doesn't know what is going to arrive in it.

> 
> > In virtio pci case, it is similar improvement to what nvme pci driver went
> through few years back to support hot plug/unplug.
> > Lets complete this of fixes to make it little more robust like nvme.
> 
> At least please mention in commit log that it's incomplete.
This fix is self-contained. I don’t see mentioning about other bugs in this commit log.
But sure yes, I will mentioned in the cover letter that more improvements will be done subsequently.
Thanks.
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux