[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Triggering hotplug scripts multiple times
On Fri, Mar 30, 2007 at 09:08:46AM +0100, Keir Fraser wrote: > > > > On 30/3/07 09:01, "Jacob Gorm Hansen" <jacobg@xxxxxxx> wrote: > > > I am not sure what the correct workaround is, other than paying > > attention to the quality of hotplug scripts. Somehow it feels wrong > > that a guest domain is able to arbitrarily trigger scripts in dom0, > > though the ability to restart devices is a necessity for unprivileged > > boot-loaders. Perhaps the hotplug scripts should only be triggered > > once, the first time the frontend is configured? > > I thought the scripts only triggered when the backend device was first > created. I don't think they should need to execute on frontend state > transitions. Problem is that if the domain disconnects from the netif, which it has to when handing over the device to the domU kernel from a bootloader, the netif is destroyed, and when the new one is created the hotplug script gets kicked, e.g.: case XenbusStateInitialising: if (dev->state == XenbusStateClosed) { printk("%s: %s: prepare for reconnect\n", __FUNCTION__, dev->nodename); if (be->netif) { netif_disconnect(be->netif); be->netif = NULL; } xenbus_switch_state(dev, XenbusStateInitWait); } I suppose one could postpone freeing the netif until the domain has gone away. Another problem with how this currently works is that vifs don't get garbage collected properly if the domain is killed without a proper shutdown. Jacob
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |