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

Re: [Xen-devel] [PATCH v5 1/2] libxl: Introduce functions to add and remove USB devices to an HVM guest



On 19/04/13 12:00, George Dunlap wrote:
On 19/04/13 11:50, Ian Campbell wrote:
On Fri, 2013-04-19 at 11:18 +0100, George Dunlap wrote:
We could add an option that says "attempt to do the remove even if
you
don't see the device in xenstore" I suppose.  But I'm not really sure
how to document that in a useful way without basically describing the
internal mechanics of the command.

There's nothing we can really do about usb-list though.
You could write it to xenstore before attempting the qmp commands. That
just relies on the qmp remove failing gracefully for devices which
aren't actually attached.
qmp remove will just return an error if you attempt to remove a device
id it doesn't know about.  I suppose that could work.  It's also a bit
more robust against, say, the xenstore add failing for whatever reason.

Hmm, if the qmp_remove fails, we don't know if that's because because the device didn't exist, or because it failed for some other reason. If qmp remove fails, we shouldn't touch the xenstore entry.

So I think you get in to the same basic problem here, except that you get an un-removeable xenstore entry instead of an unremoveable USB device.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.