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] cleanup "struct xenbus_driver"

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] cleanup "struct xenbus_driver"
From: Gerd Hoffmann <kraxel@xxxxxxx>
Date: Tue, 11 Jul 2006 17:54:53 +0200
Cc: Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 11 Jul 2006 08:55:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <8cf0fb2d74fc4ac3bac78670de4e1476@xxxxxxxxxxxx>
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>
References: <44B3542A.20301@xxxxxxx> <44B38E85.2070902@xxxxxxx> <8cf0fb2d74fc4ac3bac78670de4e1476@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.4 (X11/20060527)
Keir Fraser wrote:
> 
> On 11 Jul 2006, at 12:41, Gerd Hoffmann wrote:
> 
>>> "struct xenbus_driver" has alot of elements duplicated
>>> with "struct device_driver".  This patch removes them
>>> all and does the related code changes.
>>
>> Oops, wrong direction, ignore that one, sorry.
> 
> The patch looked to be in the correct direction to me?

Well, parts of it are fine, but not everything.

I got "Driver 'vbd' needs updating - please use bus_type methods"
messages in the log; seems using both xenbus_frontend->bus->probe() and
xenbus_device->driver->probe() (which the patch does) is the reason for
that.

I've checked what others (pci for example) are doing, they have
pci_driver->probe() and friends too, so that probably is just fine.

The .name and .owner elements of xenbus_driver can be dropped in favor
of the device_driver ones.  And xenbus_dev_{probe,remove} also can be
hooked directly into xenbus_{frontend,backend}->bus->{probe,remove}
instead of overwriting the device_driver hooks in the driver register
functions.  I'll post an updated version soon.

Right now I'm fighting with another xenbus issue:  kexec'ing a new
kernel requires a workflow which can't be handled nicely by the current
xenbus state engine.  Old kernel must do a clean shutdown so it doesn't
leak grant table entries and stuff like that.  But without making the
device disappear, which happens if you just do
"xenbus_state_switch(Closing)", after some chit-chat between frontend
and backend.  Additionally it must also bring xenbus and backend device
into the state the new kernel expects ...

cheers,

  Gerd

-- 
Gerd Hoffmann <kraxel@xxxxxxx>
http://www.suse.de/~kraxel/julika-dora.jpeg

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