hey, For event notification there are 2 functions that i came across. notify_remote_via_irq(int irq) notify_remote_via_evtchn(int port) I tried to use those, but didnt know how to check whether notification has occurred. Is there a way in which i can check the success of the commands. Thanks. -- Nupur Ghatnekar _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
>>> On 21.03.12 at 07:20, Nupur Ghatnekar <nupurghatnekar@gmail.com> wrote: > For event notification there are 2 functions that i came across. > > notify_remote_via_irq(int irq) > notify_remote_via_evtchn(int port) > > I tried to use those, but didnt know how to check whether notification has > occurred. Is there a way in which i can check the success of the commands.While the function could be made return an error indication, there''s little point in doing so - the only possibility for things going wrong is that you pass in bad arguments. Jan
On Wed, Mar 21, 2012 at 2:17 PM, Jan Beulich <JBeulich@suse.com> wrote:> >>> On 21.03.12 at 07:20, Nupur Ghatnekar <nupurghatnekar@gmail.com> > wrote: > > For event notification there are 2 functions that i came across. > > > > notify_remote_via_irq(int irq) > > notify_remote_via_evtchn(int port) > > > > I tried to use those, but didnt know how to check whether notification > has > > occurred. Is there a way in which i can check the success of the > commands. > > While the function could be made return an error indication, there''s > little point in doing so - the only possibility for things going wrong is > that you pass in bad arguments. > > Jan > > >> But is there no other way to find out what happens at the remote endafter> it receives the notification?No. Jan Then how does inter-domain communication happen?? A simple split device driver implementation blkfront wants to access data -queue a “read request” into memory it shares with blkback -notify blkback in dom0 using an event channel blkback experiences an “interrupt” as a result of the event sent to it -looks in the shared memory to find the request -executes the read operation -puts a response in shared memory -notifies blkfront in the domU using an event channel blkfront experiences an “interrupt” due to the event sent to it -completes processing of the new data How does this notification work? Could you please explain? if there are any sample codes i can refer to, that would be great! -- Nupur Ghatnekar _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
On Wed, Mar 21, 2012 at 11:50:48AM +0530, Nupur Ghatnekar wrote:> hey, > For event notification there are 2 functions that i came across. > > notify_remote_via_irq(int irq) > notify_remote_via_evtchn(int port) > > I tried to use those, but didnt know how to check whether notification has > occurred. Is there a way in which i can check the success of the commands.You should also use ''request_irq'' to bind yourself to the IRQ number. That way your handler would awake when it is done. Look at how the existing front and backend drivers do it.> > Thanks. > > -- > > Nupur Ghatnekar> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel