Hi, Can anyone please tell me how to get ".probe" function in "struct xenbus_driver" called? I want to do one simple test of event channel communication between peer modules of domU and dom0. I wrote one backend and one frontend driver (I tried registered as misc/blk/input device) where I put in all my xenbus routines, but cannot get .probe called after insmod my module, I have put one week''s time to try to find the answer, failed. Thanks a lot! -Jian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I know it is a naive question. But can anyone please give me one hand on this? I tried the example of "http://wiki.xensource.com/xenwiki/XenIntro#head-d210a9b066af7165219af8f0652a12137245a123" does not work. Thanks a lot! -Jian On 2/28/07, Jian Wang <jeans.wang@gmail.com> wrote:> Hi, > Can anyone please tell me how to get ".probe" function in "struct > xenbus_driver" called? > I want to do one simple test of event channel communication between > peer modules of > domU and dom0. > I wrote one backend and one frontend driver (I tried registered as > misc/blk/input device) where I put in all my xenbus routines, but > cannot get .probe called after insmod my module, I have put > one week''s time to try to find the answer, failed. > > Thanks a lot! > -Jian >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
In the Xenintro, before "triggering of probe() in a backend driver" example, it says: "Note: this example worked in the past, but with the release of xen 3.0 it stopped to work. We are working on fixing it." Anyone knows whom could I get help from? This example is really important for beginners like me to start with. -Jian On 3/5/07, Jian Wang <jeans.wang@gmail.com> wrote:> I know it is a naive question. But can anyone please give me one hand on this? > > I tried the example of > "http://wiki.xensource.com/xenwiki/XenIntro#head-d210a9b066af7165219af8f0652a12137245a123" > does not work. > > Thanks a lot! > -Jian > > On 2/28/07, Jian Wang <jeans.wang@gmail.com> wrote: > > Hi, > > Can anyone please tell me how to get ".probe" function in "struct > > xenbus_driver" called? > > I want to do one simple test of event channel communication between > > peer modules of > > domU and dom0. > > I wrote one backend and one frontend driver (I tried registered as > > misc/blk/input device) where I put in all my xenbus routines, but > > cannot get .probe called after insmod my module, I have put > > one week''s time to try to find the answer, failed. > > > > Thanks a lot! > > -Jian > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Yeah, the wiki page you refer to in a later message is incorrect, but I think that the major thing wrong with it is the xenstore-write commands. (At the moment I don''t have time to check whether the skeleton driver code is correct, and I can''t remember if I had to tweak it when I went through what you''re going through.) Here''s 4 xenstore-write commands that should get a probe out of the device: xenstore-write /local/domain/5/device/mydevice/0/state 1 xenstore-write /local/domain/0/backend/mydevice/5/0/frontend-id 5 xenstore-write /local/domain/0/backend/mydevice/5/0/frontend /local/domain/5/device/mydevice/0 xenstore-write /local/domain/0/backend/mydevice/5/0/state 1 Quick note: That will only work once per boot, because once the driver is probed with frontend-id 5 the xenbus code seems to be smart enough to not do it again. If you need to make another probe happen during the same boot, just increment the 5 all around. I hope this helps. Thanks Ryan Jian Wang <jeans.wang@gmail.com> wrote:> Hi, > Can anyone please tell me how to get ".probe" function in "struct > xenbus_driver" called? > I want to do one simple test of event channel communication between > peer modules of > domU and dom0. > I wrote one backend and one frontend driver (I tried registered as > misc/blk/input device) where I put in all my xenbus routines, but > cannot get .probe called after insmod my module, I have put > one week''s time to try to find the answer, failed. > > Thanks a lot! > -Jian > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Attached you''ll find a simple bash script illustrating how to get both the backend and frontend of the skeleton driver to fire. Here''s how to use it: -Startup a Xen guest that contains your frontend driver, and be sure dom0 contains the backend driver. -Figure out the frontend-id for the guest. (I only have one guest so, the frontend-id is the number on the first line of `xenstore-ls /local/domain/0/backend/vbd`). Let''s pretend that number is 3. -Run the script as so: ./probetest.sh mydevice 3 That should fire both probes. The only tricky things about the script are writing the states in the right order and changing the permissions of one of the xenstore keys. Thanks Ryan Jian Wang wrote:> It really works for backend!! > Thanks a lot. > But seems frontend .probe still not got called. > Could you tell me how to adjust the parameter to make the frontend do > probe? > -Jian > > > On 3/6/07, Ryan Riley <rileyrd@purdue.edu> wrote: >> Yeah, the wiki page you refer to in a later message is incorrect, but I >> think that the major thing wrong with it is the xenstore-write commands. >> (At the moment I don''t have time to check whether the skeleton driver >> code is correct, and I can''t remember if I had to tweak it when I went >> through what you''re going through.) >> >> Here''s 4 xenstore-write commands that should get a probe out of the >> device: >> >> xenstore-write /local/domain/5/device/mydevice/0/state 1 >> >> xenstore-write /local/domain/0/backend/mydevice/5/0/frontend-id 5 >> >> xenstore-write /local/domain/0/backend/mydevice/5/0/frontend >> /local/domain/5/device/mydevice/0 >> >> xenstore-write /local/domain/0/backend/mydevice/5/0/state 1 >> >> Quick note: That will only work once per boot, because once the driver >> is probed with frontend-id 5 the xenbus code seems to be smart enough to >> not do it again. If you need to make another probe happen during the >> same boot, just increment the 5 all around. I hope this helps. >> >> Thanks >> Ryan >> >> Jian Wang <jeans.wang@gmail.com> wrote: >> > Hi, >> > Can anyone please tell me how to get ".probe" function in "struct >> > xenbus_driver" called? >> > I want to do one simple test of event channel communication >> between >> > peer modules of >> > domU and dom0. >> > I wrote one backend and one frontend driver (I tried registered as >> > misc/blk/input device) where I put in all my xenbus routines, but >> > cannot get .probe called after insmod my module, I have put >> > one week''s time to try to find the answer, failed. >> > >> > Thanks a lot! >> > -Jian >> > >> > >> >> >>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel