OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [PATCH v2] Add device reset timeout field


On Fri, Oct 08, 2021 at 10:51:02AM +0000, Parav Pandit wrote:
> > That's why I ask: why do we bother? What's wrong with just waiting forever or
> > until user gets tired of this and cancels with CTRL-C?
> 
> Today, device removal of the device gets stuck for the device which didn't finish the reset, because its waiting for ever.
> 
> modprobe to my knowledge cannot be Ctrl-C. In another scenario, device probing of hot plug device occurs by hotplug driver in a workqueue context.

Frankly I'm not sure we need to worry about esoterica like
hotplug working when device can't get out of reset. If guest is
more or less alive that's already an achievement.

> It doesn't sound right to pass the burden to the user to invent some kind of ctrl-C cancel operation in hotplug drivers.

Oh interesting. Thanks for providing the motivation.

So if it's device removal you are after to fix,
then the proposed spec won't be enough I suspect, since
there's no specific time when we can be sure DMA won't
happen anymore. Just giving up on device isn't possible,
if you do you risk corrupting guest memory which seems scarier
than just blocking hotplug.

I guess with this in mind, what would be needed is a more fine-grained
approach. E.g. driver writes 0 to reset, device returns 1 to indicate
reset in progress, at that point it can promise that DMA/interrupts
won't happen any longer, so driver can go away.




> > Is there a use-case where that's not good enough?
> A guest has got one good and another device that encountered a fault.
> Due to this faulty device which is unable to reset, is blocking other operations in the system.

It's pretty uncommon for guests to actually have devices
they don't really need to function normally.

> > 
> > 
> > > And this is probably yet another good reason to define migratable bits
> > > of a virtio device in the live migration spec extension.
> > 
> > "migratable bits" being what? non-guest visible device state? Sure, would be
> > great to have.  Don't think it will help in this instance.
> > 
> > --
> > MST



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]