WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Fix device removal on net and block frontend dri

To: Murillo Fernandes Bernardes <mfb@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Fix device removal on net and block frontend drivers
From: Stefan Berger <stefanb@xxxxxxxxxx>
Date: Mon, 21 Nov 2005 11:49:19 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 21 Nov 2005 16:49:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200511211433.31356.mfb@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx


Murillo Fernandes Bernardes <mfb@xxxxxxxxxx> wrote on 11/21/2005 11:33:31 AM:

> On Monday 21 November 2005 14:07, Stefan Berger wrote:
> > xen-devel-bounces@xxxxxxxxxxxxxxxxxxx wrote on 11/21/2005 10:43:01 AM:
> > > Frontend devices are not being unregistered when in closed state. The
> > > following patch fix that.
> > >
> > > Fix bug #420.
> > >
> > > Makes "05_attach_and_dettach_device_repeatedly_pos" and
> > > "09_attach_and_dettach_device_check_data_pos" tests pass.
> >
> > Did you test this with suspending / resuming a dom U? The reason I am
> > asking is that when suspending the driver immediately gets into state
> > 'Closed' and when resuming into state 'Connected',  but now your device is
> > unregistered.
>
> No, I did not test suspend/resume.
>
> I really don't see why it should get into Closed on suspend, but anyway, is
> this really hapenning? I could not find any switch to Closed into suspend's
> code, neither on resume.
>

What I am seeing is that after a suspend / resume the interface 'eth0' is completely gone. 'ifconfig -a' shows everything, but no eth0.

You might only want to unregister if the domain was not suspended. So you probably need to implement the .suspend function in the frontend and set a state variable to know whether the domain is being hibernated, and you clear that variable in the .resume. You check that variable when the driver is going into the 'Closed' state and only unregister if not in 'suspend' mode.

> How to test suspend/resume on a domU? It does not have /sys/power/state
> neither /proc/sleep.


'xm save <dom id> <dom state filename>' lets you suspend a domain
'xm restore <dom state filename>' lets you resume a domain.

I would only use the network driver for testing this by booting into a RAMDisk.

 Stefan

>
> --
> Murillo Fernandes Bernardes
> IBM Linux Technology Center
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel