Hi, This patch is a cleanup for "struct xenbus_driver" and the xenbus code. "struct xenbus_driver" has alot of elements duplicated with "struct device_driver". This patch removes them all and does the related code changes. patch is against changeset 10650 (unstable tree). please apply, Gerd -- Gerd Hoffmann <kraxel@suse.de> http://www.suse.de/~kraxel/julika-dora.jpeg _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gerd Hoffmann
2006-Jul-11 11:41 UTC
Re: [Xen-devel] [PATCH] cleanup "struct xenbus_driver"
> "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. cheers, Gerd -- Gerd Hoffmann <kraxel@suse.de> http://www.suse.de/~kraxel/julika-dora.jpeg _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Gerd Hoffmann
2006-Jul-11 15:54 UTC
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@suse.de> http://www.suse.de/~kraxel/julika-dora.jpeg _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 11 Jul 2006, at 16:54, Gerd Hoffmann wrote:> 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.Yes, effectively overloading the function pointers looked dodgy to me. They have their own device_driver -specific semantics that we do not share. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel