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 5/6] frontend device shutdown

To: Gerd Hoffmann <kraxel@xxxxxxx>, Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [patch 5/6] frontend device shutdown
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sat, 19 Aug 2006 13:25:05 +0100
Delivery-date: Sat, 19 Aug 2006 05:34:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <44E47744.9070302@xxxxxxx>
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
Thread-index: AcbDioAtvukU8C99Edu36QANk04WTA==
Thread-topic: [Xen-devel] [patch 5/6] frontend device shutdown
User-agent: Microsoft-Entourage/11.2.5.060620


On 17/8/06 3:03 pm, "Gerd Hoffmann" <kraxel@xxxxxxx> wrote:

> xenbus_closing_done() behaves differently depending on how the closing
> was triggered.  If it was triggered by the backend the frontend acks the
> removal by going to CLosed.  If it was triggered via device_shutdown()
> the state is set back to "Initializing", to allow a possible new kernel
> instance to reuse the devices (for domU kexec again ;)

I really don't like that distinction very much (moving to Initialising
instead of Closed). The problem is really in the backend, which incorrectly
interprets XenbusStateClosed as a request to completely unregister the
device. The reason it does this is because the control tools signal that
destruction should take place by deleting the frontend directory in
xenstore. This results in xenbus_read_driver_state() returning
XenbusStateClosed, hence the backend drivers have interpreted that state
value as a destruction request from the tools.

I've gone some way to cleaning this up in changeset 11203, which instead has
xenbus_read_driver_state() return XenbusStateUnknown if the frontend
directory is missing. You should use this to distinguish the Closed and
Unkown states in the backend drivers: this will mean that you won't need to
avoid entering state Closed in the frontend drivers.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel