* Handle for events?
@ 2010-09-29 4:46 Srujan D. Kotikela
2010-09-29 16:08 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 8+ messages in thread
From: Srujan D. Kotikela @ 2010-09-29 4:46 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 333 bytes --]
Hi,
I am trying to send events from DomU to the Dom0. I have established an
event channel. I used to xc_evtchn_notify() to send an event. But I am not
sure how to check if the event has been sent. Through source browsing I
found an event handler for xensource. Is there no generic handler for event
channels?
--
Srujan D. Kotikela
[-- Attachment #1.2: Type: text/html, Size: 393 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Handle for events?
2010-09-29 4:46 Handle for events? Srujan D. Kotikela
@ 2010-09-29 16:08 ` Jeremy Fitzhardinge
2010-09-29 16:27 ` Srujan D. Kotikela
0 siblings, 1 reply; 8+ messages in thread
From: Jeremy Fitzhardinge @ 2010-09-29 16:08 UTC (permalink / raw)
To: Srujan D. Kotikela; +Cc: xen-devel
On 09/28/2010 09:46 PM, Srujan D. Kotikela wrote:
> Hi,
>
> I am trying to send events from DomU to the Dom0. I have established
> an event channel. I used to xc_evtchn_notify() to send an event. But I
> am not sure how to check if the event has been sent. Through source
> browsing I found an event handler for xensource. Is there no generic
> handler for event channels?
/dev/xen/evtchn allows a usermode program to wait for specific event
channels.
J
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Handle for events?
2010-09-29 16:08 ` Jeremy Fitzhardinge
@ 2010-09-29 16:27 ` Srujan D. Kotikela
2010-09-29 16:29 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 8+ messages in thread
From: Srujan D. Kotikela @ 2010-09-29 16:27 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1071 bytes --]
I called the xc_evtchn_notify(). But I see no message/notification in
/dev/xen/evtchn (in either DomU or Dom0). I did a little research and found
there might be problem with my xen-evtchn module. However it is statically
compiled into my kernel and i can see the following contents in /proc/xen
ls /proc/xen/
balloon capabilities privcmd xenbus xsd_kva xsd_port
For now I just want to send and event and acknowledge it (later application
will be built on top of this).
--
Srujan D. Kotikela
On Wed, Sep 29, 2010 at 11:08 AM, Jeremy Fitzhardinge <jeremy@goop.org>wrote:
> On 09/28/2010 09:46 PM, Srujan D. Kotikela wrote:
> > Hi,
> >
> > I am trying to send events from DomU to the Dom0. I have established
> > an event channel. I used to xc_evtchn_notify() to send an event. But I
> > am not sure how to check if the event has been sent. Through source
> > browsing I found an event handler for xensource. Is there no generic
> > handler for event channels?
>
> /dev/xen/evtchn allows a usermode program to wait for specific event
> channels.
>
> J
>
[-- Attachment #1.2: Type: text/html, Size: 1507 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Handle for events?
2010-09-29 16:27 ` Srujan D. Kotikela
@ 2010-09-29 16:29 ` Jeremy Fitzhardinge
2010-09-29 16:34 ` Srujan D. Kotikela
0 siblings, 1 reply; 8+ messages in thread
From: Jeremy Fitzhardinge @ 2010-09-29 16:29 UTC (permalink / raw)
To: Srujan D. Kotikela; +Cc: xen-devel
On 09/29/2010 09:27 AM, Srujan D. Kotikela wrote:
> I called the xc_evtchn_notify(). But I see no message/notification in
> /dev/xen/evtchn (in either DomU or Dom0). I did a little research and
> found there might be problem with my xen-evtchn module. However it is
> statically compiled into my kernel and i can see the following
> contents in /proc/xen
>
> ls /proc/xen/
> balloon capabilities privcmd xenbus xsd_kva xsd_port
/proc/xen is not the same as /dev/xen
J
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Handle for events?
2010-09-29 16:29 ` Jeremy Fitzhardinge
@ 2010-09-29 16:34 ` Srujan D. Kotikela
2010-09-29 17:16 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 8+ messages in thread
From: Srujan D. Kotikela @ 2010-09-29 16:34 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1011 bytes --]
Sorry,
But from what I read I may not get notifications on /dev/xen/evtchn if my
xen-evtchn module is not functioning. However if it is statically compiled
it wont be found as a module. I can confirm it's working by checking if
there are directories in my /proc/xen
correct me if I am wrong.
I am calling notify() and I am getting a return value 0 but no notification
mesages in /dev/xen/evtchn
--
Srujan D. Kotikela
On Wed, Sep 29, 2010 at 11:29 AM, Jeremy Fitzhardinge <jeremy@goop.org>wrote:
> On 09/29/2010 09:27 AM, Srujan D. Kotikela wrote:
> > I called the xc_evtchn_notify(). But I see no message/notification in
> > /dev/xen/evtchn (in either DomU or Dom0). I did a little research and
> > found there might be problem with my xen-evtchn module. However it is
> > statically compiled into my kernel and i can see the following
> > contents in /proc/xen
> >
> > ls /proc/xen/
> > balloon capabilities privcmd xenbus xsd_kva xsd_port
>
> /proc/xen is not the same as /dev/xen
>
> J
>
[-- Attachment #1.2: Type: text/html, Size: 1433 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Handle for events?
2010-09-29 16:34 ` Srujan D. Kotikela
@ 2010-09-29 17:16 ` Jeremy Fitzhardinge
[not found] ` <AANLkTimqZS_5+rjO5uv9ZBnTKM9feAnupe9KbhZkrug5@mail.gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Jeremy Fitzhardinge @ 2010-09-29 17:16 UTC (permalink / raw)
To: Srujan D. Kotikela; +Cc: xen-devel
On 09/29/2010 09:34 AM, Srujan D. Kotikela wrote:
> Sorry,
>
> But from what I read I may not get notifications on /dev/xen/evtchn if
> my xen-evtchn module is not functioning. However if it is statically
> compiled it wont be found as a module. I can confirm it's working by
> checking if there are directories in my /proc/xen
>
> correct me if I am wrong.
/proc/xen is irrelevant to xen-evtchn; you would not expect to see any
changes in /proc/xen as a result of xen-evtchn being present or absent.
>
> I am calling notify() and I am getting a return value 0 but no
> notification mesages in /dev/xen/evtchn
You should look carefully at the existing examples of how to use that
device to see where you're going wrong.
J
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Handle for events?
[not found] ` <AANLkTimqZS_5+rjO5uv9ZBnTKM9feAnupe9KbhZkrug5@mail.gmail.com>
@ 2010-10-08 16:11 ` Srujan D. Kotikela
[not found] ` <4CB4A18F.3040203@goop.org>
1 sibling, 0 replies; 8+ messages in thread
From: Srujan D. Kotikela @ 2010-10-08 16:11 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1839 bytes --]
Hi Jeremy,
I was going through the code in mini-os. The hypervisor_callback, which
handles all the events, is defined in the x86_64.S file. In xen sources I
see xen/arch/x86/x86_64/entry.S with no such callback function.
>From what I read in the Xen Definitive guide, There is a single handler for
all events (hypervisor_callback) which in turn should call individual
handlers, which are registered before hand, for each event. I have few
questions regarding this:
1. Is there a default event handler for Dom0 kernel (like
hypervisor_callback in mini-os). If so, what is the function to register
event handlers for specific port/channel (I tried searching the code and
couldn't find any)?
2. If no default handler exists how are the handlers for xen_console and
xen_store events or any other events setup?
3. Is the ./xen/arch/x86/x86_64/entry.S analogous to
./extras/mini-os/arch/x86/x86_64.S? I mean If I have to write event handler,
should I edit entry.S?
--
Srujan D. Kotikela
On Wed, Sep 29, 2010 at 12:16 PM, Jeremy Fitzhardinge <jeremy@goop.org>wrote:
> On 09/29/2010 09:34 AM, Srujan D. Kotikela wrote:
> > Sorry,
> >
> > But from what I read I may not get notifications on /dev/xen/evtchn if
> > my xen-evtchn module is not functioning. However if it is statically
> > compiled it wont be found as a module. I can confirm it's working by
> > checking if there are directories in my /proc/xen
> >
> > correct me if I am wrong.
>
> /proc/xen is irrelevant to xen-evtchn; you would not expect to see any
> changes in /proc/xen as a result of xen-evtchn being present or absent.
>
> >
> > I am calling notify() and I am getting a return value 0 but no
> > notification mesages in /dev/xen/evtchn
>
> You should look carefully at the existing examples of how to use that
> device to see where you're going wrong.
>
> J
>
[-- Attachment #1.2: Type: text/html, Size: 2459 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Handle for events?
[not found] ` <4CB4A18F.3040203@goop.org>
@ 2010-10-27 3:19 ` Srujan D. Kotikela
0 siblings, 0 replies; 8+ messages in thread
From: Srujan D. Kotikela @ 2010-10-27 3:19 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 3786 bytes --]
Hi jeremy,
I have looked into the events.c
The function *bind_evtchn_to_irqhandler(*(int evtchn, irq_handler_t
handler, unsigned long irqflags, *const char *devname, void *dev_id) *looks
the most appropriate for me. However, I wouldn't have any device name or
Id. So I am not sure how I can use it to set up the handler.
I am looking to setup a very light weight communication mechanism from DomU
to Dom0. The application in DomU will raise a hypercall. The hypercall
handler will send an event to Dom0. This communication setup is just to
notify an *event* to Dom0 excluding the DomU kernel.
I am facing 2 roadblocks for this setup.
- How to install an event handler for the event channel (between Dom0 and
hypervisor).
- How can I send an event to Dom0. The only function I found was
*xc_evtchn_notify()
*But AFAIK this function or the
*event_channel_op send* are to be done by from a domain (through
port). So how can I trigger/send an event from hypervisor to Dom0.
Finally, does establishing an event channel (using xc_evtchn_open) guarantee
an event channel between Dom0 and hypervisor? Or is there any specific
function for the same.
Thanks and regards,
Srujan D. Kotikela
On Tue, Oct 12, 2010 at 12:57 PM, Jeremy Fitzhardinge <jeremy@goop.org>wrote:
> On 10/08/2010 09:10 AM, Srujan D. Kotikela wrote:
> > From what I read in the Xen Definitive guide, There is a single
> > handler for all events (hypervisor_callback) which in turn should call
> > individual handlers, which are registered before hand, for each event.
> > I have few questions regarding this:
> >
> > 1. Is there a default event handler for Dom0 kernel (like
> > hypervisor_callback in mini-os). If so, what is the function to
> > register event handlers for specific port/channel (I tried searching
> > the code and couldn't find any)?
>
> Yes, xen_do_hypervisor_callback in kernel/entry_64.S. Events are mapped
> to the Linux IRQ subsystem, so registering for an event channel requires
> mapping it to an irq, then registering an irq as normal. The code to
> implement it is in drivers/xen/events.c.
>
>
> >
> > 2. If no default handler exists how are the handlers for xen_console
> > and xen_store events or any other events setup?
>
> The events are bound to irqs, and the irq handler deals with the
> events. You can see the registrations in /proc/interrupts.
>
> >
> > 3. Is the ./xen/arch/x86/x86_64/entry.S analogous to
> > ./extras/mini-os/arch/x86/x86_64.S? I mean If I have to write event
> > handler, should I edit entry.S?
>
> That looks like a path into the source for Xen (the hypervisor) itself.
> Xen doesn't need an event upcall entrypoint because it is initiating all
> the upcalls.
>
> J
>
> >
> > --
> > Srujan D. Kotikela
> >
> >
> > On Wed, Sep 29, 2010 at 12:16 PM, Jeremy Fitzhardinge <jeremy@goop.org
> > <mailto:jeremy@goop.org>> wrote:
> >
> > On 09/29/2010 09:34 AM, Srujan D. Kotikela wrote:
> > > Sorry,
> > >
> > > But from what I read I may not get notifications on
> > /dev/xen/evtchn if
> > > my xen-evtchn module is not functioning. However if it is
> statically
> > > compiled it wont be found as a module. I can confirm it's working
> by
> > > checking if there are directories in my /proc/xen
> > >
> > > correct me if I am wrong.
> >
> > /proc/xen is irrelevant to xen-evtchn; you would not expect to see
> any
> > changes in /proc/xen as a result of xen-evtchn being present or
> > absent.
> >
> > >
> > > I am calling notify() and I am getting a return value 0 but no
> > > notification mesages in /dev/xen/evtchn
> >
> > You should look carefully at the existing examples of how to use that
> > device to see where you're going wrong.
> >
> > J
> >
> >
>
>
[-- Attachment #1.2: Type: text/html, Size: 4952 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-10-27 3:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 4:46 Handle for events? Srujan D. Kotikela
2010-09-29 16:08 ` Jeremy Fitzhardinge
2010-09-29 16:27 ` Srujan D. Kotikela
2010-09-29 16:29 ` Jeremy Fitzhardinge
2010-09-29 16:34 ` Srujan D. Kotikela
2010-09-29 17:16 ` Jeremy Fitzhardinge
[not found] ` <AANLkTimqZS_5+rjO5uv9ZBnTKM9feAnupe9KbhZkrug5@mail.gmail.com>
2010-10-08 16:11 ` Srujan D. Kotikela
[not found] ` <4CB4A18F.3040203@goop.org>
2010-10-27 3:19 ` Srujan D. Kotikela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.