|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] cleanup "struct xenbus_driver"
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
|
|
|
|
|