xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* notification in xen
@ 2012-03-21  6:20 Nupur Ghatnekar
  2012-03-21  8:47 ` Jan Beulich
  2012-05-10 15:37 ` Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 4+ messages in thread
From: Nupur Ghatnekar @ 2012-03-21  6:20 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 319 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 374 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: notification in xen
  2012-03-21  6:20 notification in xen Nupur Ghatnekar
@ 2012-03-21  8:47 ` Jan Beulich
  2012-03-22 11:47   ` Nupur Ghatnekar
  2012-05-10 15:37 ` Konrad Rzeszutek Wilk
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2012-03-21  8:47 UTC (permalink / raw)
  To: Nupur Ghatnekar; +Cc: 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: notification in xen
  2012-03-21  8:47 ` Jan Beulich
@ 2012-03-22 11:47   ` Nupur Ghatnekar
  0 siblings, 0 replies; 4+ messages in thread
From: Nupur Ghatnekar @ 2012-03-22 11:47 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1565 bytes --]

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 end
after
> 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

[-- Attachment #1.2: Type: text/html, Size: 4868 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: notification in xen
  2012-03-21  6:20 notification in xen Nupur Ghatnekar
  2012-03-21  8:47 ` Jan Beulich
@ 2012-05-10 15:37 ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-05-10 15:37 UTC (permalink / raw)
  To: Nupur Ghatnekar; +Cc: 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-10 15:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21  6:20 notification in xen Nupur Ghatnekar
2012-03-21  8:47 ` Jan Beulich
2012-03-22 11:47   ` Nupur Ghatnekar
2012-05-10 15:37 ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).