Hi, I wrote subj in my module and i get instant reboot after calling this function. It doesn''t depend on were xenstored started or not. Please, explain me this thing: can i write back/front end drivers in the next manner: backend creates directory mydir in xenstore. Then frontends write files mydir/file-<domid> by xenbus_printf where they put grant reference to the shared frame and event chanel''s port. Then backend reads this information and communicate with frontends. If it is right way for what reason xenbus drivers exist? And in what path in xenstore should i put mydir? If it is not a right way, how to use xenbus drivers? I tryed to make simple front/back end drivers. They register only probe function in xenbus_driver struct and in this function do simple printk and return 0, but this function is never called. Backend module registers its driver by xenbus_register_backend, frontend by xenbus_register_device. -- Best regards, Anton Korenyushkin mailto:tiger@swsoft.mipt.ru _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 9/28/05, Anton Korenyushkin <tiger@swsoft.mipt.ru> wrote:> Hi, > > I wrote subj in my module and i get instant reboot after calling this > function. It doesn''t depend on were xenstored started or not. >I guess something wrong with your code. I wrote some kernel code uses xenbus, and see no problem. Why dont you post your code here and let people comment on it? Hieu _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Anton Korenyushkin
2005-Sep-28 13:07 UTC
Re: [Xen-devel] xenbus_mkdir("/tools", "name") fails
On Wednesday 28 September 2005 07:47, NAHieu wrote:> On 9/28/05, Anton Korenyushkin <tiger@swsoft.mipt.ru> wrote: > > Hi, > > > > I wrote subj in my module and i get instant reboot after calling this > > function. It doesn''t depend on were xenstored started or not. > > I guess something wrong with your code. I wrote some kernel code uses > xenbus, and see no problem. > > Why dont you post your code here and let people comment on it? > > Hieu > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-develI have attached module''s code. There are a lot of proc fs stuff in it, xenbus_mkdir is called when root writes something into /proc/xen/prmigr. I execute commands xend start && echo ''hi'' >/proc/xen/prmigr. And then i get reboot. -- Best regards, Anton Korenyushkin mailto:tiger@swsoft.mipt.ru _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 28 Sep 2005, at 14:07, Anton Korenyushkin wrote:> I have attached module''s code. There are a lot of proc fs stuff in it, > xenbus_mkdir is called when root writes something into > /proc/xen/prmigr. I > execute commands xend start && echo ''hi'' >/proc/xen/prmigr. And then i > get > reboot.Most obvious problem I can see is that the entire access isn;t protected by xenbus_lock. Given the current interface you would need to manually acquire and release the lock around your mkdir call. Actually I think that is pretty gross for singleton accesses like this. I''ll change the interface to internally do the locking it requires -- exposing xenbus_lock outside xenbus is not really on. Especially since we hope to improve the locking strategy in future! I''ll check somethign appropriate in and let you know to give your driver another spin. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel