Mailing List Archive

simple backend, frontend
Hi all,

Does anyone have a custom backend, frontend pair? Preferably a very
simple one that simply sets up eventchannels and shared memory pages.

Thanks.

Deepak


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
In the event you can't find a simple example, feel free to ask questions about
the existing block / net drivers. You'll find that the frontends are much
simpler so you may want to look at those first. I also found that the
backend for network was easier to understand than the block backend.

You should also look at domain_controller.h, which defines all of the control
messages used to set up the shared memory and event channels.

HTH,
Mark

On Thursday 11 Nov 2004 15:37, Deepak Manohar wrote:
> Hi all,
>
> Does anyone have a custom backend, frontend pair? Preferably a very
> simple one that simply sets up eventchannels and shared memory pages.
>
> Thanks.
>
> Deepak
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
You may also want to look at docs/misc/blkif-drivers-explained.txt,
which has a textual description of how the split block drivers work.
Alex went through it about a week ago and brought it up to date with
the (then) current sources.

a.


On Thu, 11 Nov 2004 16:07:09 +0000, Mark A. Williamson
<mark.williamson@cl.cam.ac.uk> wrote:
> In the event you can't find a simple example, feel free to ask questions about
> the existing block / net drivers. You'll find that the frontends are much
> simpler so you may want to look at those first. I also found that the
> backend for network was easier to understand than the block backend.
>
> You should also look at domain_controller.h, which defines all of the control
> messages used to set up the shared memory and event channels.
>
> HTH,
> Mark
>
>
>
> On Thursday 11 Nov 2004 15:37, Deepak Manohar wrote:
> > Hi all,
> >
> > Does anyone have a custom backend, frontend pair? Preferably a very
> > simple one that simply sets up eventchannels and shared memory pages.
> >
> > Thanks.
> >
> > Deepak
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by:
> > Sybase ASE Linux Express Edition - download now for FREE
> > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/xen-devel
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
Hi,

Ive looked at the blkifdrivers.txt.

Wht Im confused about is - both in the netif backend and the blkif
backend the initial communication is with xend. The blkif initially
sends - BLKIF_DRIVER_STATUS_UP
the netif backend sends an equivalent. Im assuming that Xend
differentiates between the two and sends different response either
CMSG_BLKIF_BE_CREATE or CMSG_NETIF_BE_CREATE.

Now if I need to add another custom backend using the same method as
the netif or blkif backends dont I have to modify Xend as well?

Is there a simpler way of establishing event channels between domains
by directly accessing the API in xen/common/event_channel.c

Some assumptions that Im making - the frontend will be started only
after the backend is running. Im primarily going to be using this
frontend/backend for transferring large data between a user domain and
the control domain. So I will have to establish shared mem pages as
well.

Thanks.

Deepak


On Thu, 11 Nov 2004 16:18:09 +0000, Andrew Warfield
<andrew.warfield@gmail.com> wrote:
> You may also want to look at docs/misc/blkif-drivers-explained.txt,
> which has a textual description of how the split block drivers work.
> Alex went through it about a week ago and brought it up to date with
> the (then) current sources.
>
> a.
>
>
>
>
> On Thu, 11 Nov 2004 16:07:09 +0000, Mark A. Williamson
> <mark.williamson@cl.cam.ac.uk> wrote:
> > In the event you can't find a simple example, feel free to ask questions about
> > the existing block / net drivers. You'll find that the frontends are much
> > simpler so you may want to look at those first. I also found that the
> > backend for network was easier to understand than the block backend.
> >
> > You should also look at domain_controller.h, which defines all of the control
> > messages used to set up the shared memory and event channels.
> >
> > HTH,
> > Mark
> >
> >
> >
> > On Thursday 11 Nov 2004 15:37, Deepak Manohar wrote:
> > > Hi all,
> > >
> > > Does anyone have a custom backend, frontend pair? Preferably a very
> > > simple one that simply sets up eventchannels and shared memory pages.
> > >
> > > Thanks.
> > >
> > > Deepak
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by:
> > > Sybase ASE Linux Express Edition - download now for FREE
> > > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/xen-devel
> >
> > -------------------------------------------------------
>
>
> > This SF.Net email is sponsored by:
> > Sybase ASE Linux Express Edition - download now for FREE
> > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/xen-devel
> >
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
At the moment, xend is probably the trickiest part in developing a new
split driver, given that (as you observe) it is rather intimately
involved in the event channel and shared memory page setup. It is
absolutely possible to use libxc to do all of this without xend, I'm
just not sure off the top of my head if you will be able to have two
listeners coexisting on /dev/eventchan, and whether xend will play
nicely with another listener.

Obviously, adding support for new backend/frontend protocols is
something that we want to make very easy for development... This is
something that has come up several times in the past couple of weeks
and we are actively looking into the best solution. In the short
term, you might want to experiment with a C implementation along side
xend, or try digging in to the python... I'll keep you posted as soon
as anything arises.

a.

On Thu, 11 Nov 2004 14:21:01 -0500, Deepak Manohar <mjdeepak@gmail.com> wrote:
> Hi,
>
> Ive looked at the blkifdrivers.txt.
>
> Wht Im confused about is - both in the netif backend and the blkif
> backend the initial communication is with xend. The blkif initially
> sends - BLKIF_DRIVER_STATUS_UP
> the netif backend sends an equivalent. Im assuming that Xend
> differentiates between the two and sends different response either
> CMSG_BLKIF_BE_CREATE or CMSG_NETIF_BE_CREATE.
>
> Now if I need to add another custom backend using the same method as
> the netif or blkif backends dont I have to modify Xend as well?
>
> Is there a simpler way of establishing event channels between domains
> by directly accessing the API in xen/common/event_channel.c
>
> Some assumptions that Im making - the frontend will be started only
> after the backend is running. Im primarily going to be using this
> frontend/backend for transferring large data between a user domain and
> the control domain. So I will have to establish shared mem pages as
> well.
>
> Thanks.
>
> Deepak
>
> On Thu, 11 Nov 2004 16:18:09 +0000, Andrew Warfield
>
>
> <andrew.warfield@gmail.com> wrote:
> > You may also want to look at docs/misc/blkif-drivers-explained.txt,
> > which has a textual description of how the split block drivers work.
> > Alex went through it about a week ago and brought it up to date with
> > the (then) current sources.
> >
> > a.
> >
> >
> >
> >
> > On Thu, 11 Nov 2004 16:07:09 +0000, Mark A. Williamson
> > <mark.williamson@cl.cam.ac.uk> wrote:
> > > In the event you can't find a simple example, feel free to ask questions about
> > > the existing block / net drivers. You'll find that the frontends are much
> > > simpler so you may want to look at those first. I also found that the
> > > backend for network was easier to understand than the block backend.
> > >
> > > You should also look at domain_controller.h, which defines all of the control
> > > messages used to set up the shared memory and event channels.
> > >
> > > HTH,
> > > Mark
> > >
> > >
> > >
> > > On Thursday 11 Nov 2004 15:37, Deepak Manohar wrote:
> > > > Hi all,
> > > >
> > > > Does anyone have a custom backend, frontend pair? Preferably a very
> > > > simple one that simply sets up eventchannels and shared memory pages.
> > > >
> > > > Thanks.
> > > >
> > > > Deepak
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > This SF.Net email is sponsored by:
> > > > Sybase ASE Linux Express Edition - download now for FREE
> > > > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > > > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > > > _______________________________________________
> > > > Xen-devel mailing list
> > > > Xen-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/xen-devel
> > >
> > > -------------------------------------------------------
> >
> >
> > > This SF.Net email is sponsored by:
> > > Sybase ASE Linux Express Edition - download now for FREE
> > > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/xen-devel
> > >
> >
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
> It is absolutely possible to use libxc to do all of this without
> xend,
Yes, but it's distinctly awkward to actually start communicating
between domains without xend being involved. Essentially, you need
some way to communicate which machine frame and event channel number
to use, and, short of copying and pasting stuff on the console, xend's
pretty much the only game in town.

> I'm just not sure off the top of my head if you will be able to have
> two listeners coexisting on /dev/eventchan, and whether xend will
> play nicely with another listener.
The current /dev/evtchn implementation can't cope with two processes
openning it at once. I have a somewhat out of date, hacked over
version which can available from http://om.elsie.org.uk/temp/evtchn.c.
It should be possible to just copy this over the top of
drivers/xen/evtchn/evtchn.c, but, as I say, it's a little out of date,
and comes with no warranties.

xend itself has no problems whatsoever with someone sharing the event
channel interface, though, provided you're careful not to bind to any
events which it uses. (i.e. if you allocate an event channel, you can
use it just fine; if xend's allocated an event channel, stay away).

> Obviously, adding support for new backend/frontend protocols is
> something that we want to make very easy for development... This is
> something that has come up several times in the past couple of weeks
> and we are actively looking into the best solution. In the short
> term, you might want to experiment with a C implementation along side
> xend, or try digging in to the python... I'll keep you posted as soon
> as anything arises.
>
> a.
>
> On Thu, 11 Nov 2004 14:21:01 -0500, Deepak Manohar <mjdeepak@gmail.com> wrote:
> > Hi,
> >
> > Ive looked at the blkifdrivers.txt.
> >
> > Wht Im confused about is - both in the netif backend and the blkif
> > backend the initial communication is with xend. The blkif initially
> > sends - BLKIF_DRIVER_STATUS_UP
> > the netif backend sends an equivalent. Im assuming that Xend
> > differentiates between the two and sends different response either
> > CMSG_BLKIF_BE_CREATE or CMSG_NETIF_BE_CREATE.
> >
> > Now if I need to add another custom backend using the same method as
> > the netif or blkif backends dont I have to modify Xend as well?
> >
> > Is there a simpler way of establishing event channels between domains
> > by directly accessing the API in xen/common/event_channel.c
> >
> > Some assumptions that Im making - the frontend will be started only
> > after the backend is running. Im primarily going to be using this
> > frontend/backend for transferring large data between a user domain and
> > the control domain. So I will have to establish shared mem pages as
> > well.
> >
> > Thanks.
> >
> > Deepak
> >
> > On Thu, 11 Nov 2004 16:18:09 +0000, Andrew Warfield
> >
> >
> > <andrew.warfield@gmail.com> wrote:
> > > You may also want to look at docs/misc/blkif-drivers-explained.txt,
> > > which has a textual description of how the split block drivers work.
> > > Alex went through it about a week ago and brought it up to date with
> > > the (then) current sources.
> > >
> > > a.
> > >
> > >
> > >
> > >
> > > On Thu, 11 Nov 2004 16:07:09 +0000, Mark A. Williamson
> > > <mark.williamson@cl.cam.ac.uk> wrote:
> > > > In the event you can't find a simple example, feel free to ask questions about
> > > > the existing block / net drivers. You'll find that the frontends are much
> > > > simpler so you may want to look at those first. I also found that the
> > > > backend for network was easier to understand than the block backend.
> > > >
> > > > You should also look at domain_controller.h, which defines all of the control
> > > > messages used to set up the shared memory and event channels.
> > > >
> > > > HTH,
> > > > Mark
> > > >
> > > >
> > > >
> > > > On Thursday 11 Nov 2004 15:37, Deepak Manohar wrote:
> > > > > Hi all,
> > > > >
> > > > > Does anyone have a custom backend, frontend pair? Preferably a very
> > > > > simple one that simply sets up eventchannels and shared memory pages.
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Deepak
> > > > >
> > > > >
> > > > > -------------------------------------------------------
> > > > > This SF.Net email is sponsored by:
> > > > > Sybase ASE Linux Express Edition - download now for FREE
> > > > > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > > > > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > > > > _______________________________________________
> > > > > Xen-devel mailing list
> > > > > Xen-devel@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/xen-devel
> > > >
> > > > -------------------------------------------------------
> > >
> > >
> > > > This SF.Net email is sponsored by:
> > > > Sybase ASE Linux Express Edition - download now for FREE
> > > > LinuxWorld Reader's Choice Award Winner for best database on Linux.
> > > > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> > > > _______________________________________________
> > > > Xen-devel mailing list
> > > > Xen-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/xen-devel
> > > >
> > >
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel

--
One day, I'm going to get an Alice-bot to answer all my email for me,
and see how long it takes people to notice.
Re: simple backend, frontend [ In reply to ]
> Wht Im confused about is - both in the netif backend and the blkif
> backend the initial communication is with xend. The blkif initially
> sends - BLKIF_DRIVER_STATUS_UP

Correct. It's a "hello, I'm ready for further instructions" message to Xend.
If Xend expects this domain to be a backend then it this is a signal that
it's ready to have devices created.

> Now if I need to add another custom backend using the same method as
> the netif or blkif backends dont I have to modify Xend as well?

Yes, that's right. Each frontend / backend pair tends to have a slightly
different control message protocol, which needs to be added to Xend.

Personally I don't think it's arduous to set up a new device type in Xend
compared to writing the device drivers in the first place (adding a new
device type is relatively short work in my experience).

> Some assumptions that Im making - the frontend will be started only
> after the backend is running.

Seems like a reasonable assumption to make.

> Im primarily going to be using this
> frontend/backend for transferring large data between a user domain and
> the control domain. So I will have to establish shared mem pages as
> well.

Interesting. Were you looking at tamper-proof logging or was that someone
else?

Cheers,
Mark


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
> Now if I need to add another custom backend using the same method as
> the netif or blkif backends dont I have to modify Xend as well?
>
> Is there a simpler way of establishing event channels between domains
> by directly accessing the API in xen/common/event_channel.c
>
> Some assumptions that Im making - the frontend will be started only
> after the backend is running. Im primarily going to be using this
> frontend/backend for transferring large data between a user domain and
> the control domain. So I will have to establish shared mem pages as
> well.

To set up an event channel and shared memory between two domains you
need some out-of-band communication, which may or may not be xend.
Instead the communication could be done via an interdomain IP network,
for example. However you arrange it, each domain probably needs to
know the domid of the other guy. Also both ends need to know the
address of the page they are to share, and the remote port for teh
shared event channel.

-- Keir


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
Hi Keir,



> To set up an event channel and shared memory between two domains you
> need some out-of-band communication, which may or may not be xend.
> Instead the communication could be done via an interdomain IP network,
> for example. However you arrange it, each domain probably needs to
> know the domid of the other guy. Also both ends need to know the
> address of the page they are to share, and the remote port for teh
> shared event channel.
>
> -- Keir
>

ok lets say that via some out of band comm channel i inform both
domains about the remote port of the shared event channel and the
address of the shared page.

can u tell me in which file is the api to perform operations on a
shared event channel? is it in xen/common/event_channel.c or is it in
linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c or
linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c

im confused which of the above api is accessible for a module in the
xenolinux kernel.

further more why arent these files in the linux-2.4.27-xen-sparse
directory? (everything works fine so it is not a prob - but i thought
the same file structure might have been followed for 2.4 and 2.6)

Thanks.

Deepak



On Fri, 12 Nov 2004 08:22:14 +0000, Keir Fraser
<keir.fraser@cl.cam.ac.uk> wrote:
>
>
> > Now if I need to add another custom backend using the same method as
> > the netif or blkif backends dont I have to modify Xend as well?
> >
> > Is there a simpler way of establishing event channels between domains
> > by directly accessing the API in xen/common/event_channel.c
> >
> > Some assumptions that Im making - the frontend will be started only
> > after the backend is running. Im primarily going to be using this
> > frontend/backend for transferring large data between a user domain and
> > the control domain. So I will have to establish shared mem pages as
> > well.
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
> can u tell me in which file is the api to perform operations on a
> shared event channel? is it in xen/common/event_channel.c or is it in

That one implements Xen's handling of event channel ops - you don't need to
interact with it directly.

> linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c or

That provides the event channel to userspace interaction - Xend uses it but
you don't need to.

> linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c

That's the one in kernel users will call into.

> further more why arent these files in the linux-2.4.27-xen-sparse
> directory? (everything works fine so it is not a prob - but i thought
> the same file structure might have been followed for 2.4 and 2.6)

There's some magic that symlinks files from the 2.6 tree into the right place.
I've never tried to figure out how it works, though ;-)

HTH,
Mark


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
On Fri, 12 Nov 2004, Keir Fraser wrote:

> > Now if I need to add another custom backend using the same method as
> > the netif or blkif backends dont I have to modify Xend as well?
> >
> > Is there a simpler way of establishing event channels between domains
> > by directly accessing the API in xen/common/event_channel.c
> >
> > Some assumptions that Im making - the frontend will be started only
> > after the backend is running. Im primarily going to be using this
> > frontend/backend for transferring large data between a user domain and
> > the control domain. So I will have to establish shared mem pages as
> > well.
>
> To set up an event channel and shared memory between two domains you
> need some out-of-band communication, which may or may not be xend.
> Instead the communication could be done via an interdomain IP network,
> for example. However you arrange it, each domain probably needs to
> know the domid of the other guy. Also both ends need to know the
> address of the page they are to share, and the remote port for teh
> shared event channel.

How do xenU domains talk to dom0? Is it a single point-to-point kind of
channel? Maybe extend that to be multipoint, like ethernet. Then, that can
be extended to be intra-machine, for cluster support.


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
Hi,

Sorry I seem to be stuck and asking similar questions.

> > linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c
>
> That's the one in kernel users will call into.

That file does not contain any code to create event channels.


Do I have to write some code in Xen tht uses xen/common/event_channel.c creates
an event channel on init. And then pass the port returned to some
other program which passes it to the other domain?

Thanks.
Deepak




On Fri, 12 Nov 2004 21:30:59 +0000, Mark A. Williamson
<mark.williamson@cl.cam.ac.uk> wrote:
> > can u tell me in which file is the api to perform operations on a
> > shared event channel? is it in xen/common/event_channel.c or is it in
>
> That one implements Xen's handling of event channel ops - you don't need to
> interact with it directly.
>
> > linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c or
>
> That provides the event channel to userspace interaction - Xend uses it but
> you don't need to.
>
> > linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c
>
> That's the one in kernel users will call into.
>
> > further more why arent these files in the linux-2.4.27-xen-sparse
> > directory? (everything works fine so it is not a prob - but i thought
> > the same file structure might have been followed for 2.4 and 2.6)
>
> There's some magic that symlinks files from the 2.6 tree into the right place.
> I've never tried to figure out how it works, though ;-)
>
> HTH,
> Mark
>


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
> Hi,
>
> Sorry I seem to be stuck and asking similar questions.
>
> > > linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c
> >
> > That's the one in kernel users will call into.
>
> That file does not contain any code to create event channels.
>
>
> Do I have to write some code in Xen tht uses xen/common/event_channel.c creates
> an event channel on init. And then pass the port returned to some
> other program which passes it to the other domain?

The 'old' model for creating event channels was that xend would create
them and pass each domain the id of its end. So no creation code
needed in XenLinux.

The 'new' model (in which one domain creates an unbound port that the
other end then connects to) is rather recent and so no drivers in
XenLinux use it, so there's no code to steal. :-)

evtchn.c is all about receipt and demux of events. You should create
your own code to create an unbound port, then you should use
bind_evtchn_to_irq() to get yourself a Linux IRQ number that you can
then get interrupts for by using 'request_irq()'.

If you're implementing a user-space driver then you won't want to bind
into the Linux IRQ subsystem -- instead you would open /dev/xen/evtchn,
bind to your event-channel port, then read() or poll() your file
descriptor. Currently only one process can have /dev/xen/evtchn open
at any time, but I know of at least two patches to fix this, so I
guess one of these ought to be checked in to the tree!

So, yes, in short, you have to write the bit of code that you describe
in your email. :-)

-- Keir


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
Hi,

Writing a custom backend driver...... can a custom backend driver be
a module in the linux kernel or does it have to be built in?

write now the backend and front end are very simple.

a user level program establishes a shared event channel using -
libxc. this part is complete.

this is the plan for the next part but need some info:

i manually plan to install the module passing the eventchannel port.
as a command line argument to the module. but i need to know if a
linux kernel module can access the xen api such as
"bind_evtchn_to_irq".

thanks.


Deepak




On Sun, 14 Nov 2004 15:42:44 +0000, Keir Fraser
<keir.fraser@cl.cam.ac.uk> wrote:
>
>
> > Hi,
> >
> > Sorry I seem to be stuck and asking similar questions.
> >
> > > > linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c
> > >
> > > That's the one in kernel users will call into.
> >
> > That file does not contain any code to create event channels.
> >
> >
> > Do I have to write some code in Xen tht uses xen/common/event_channel.c creates
> > an event channel on init. And then pass the port returned to some
> > other program which passes it to the other domain?
>
> The 'old' model for creating event channels was that xend would create
> them and pass each domain the id of its end. So no creation code
> needed in XenLinux.
>
> The 'new' model (in which one domain creates an unbound port that the
> other end then connects to) is rather recent and so no drivers in
> XenLinux use it, so there's no code to steal. :-)
>
> evtchn.c is all about receipt and demux of events. You should create
> your own code to create an unbound port, then you should use
> bind_evtchn_to_irq() to get yourself a Linux IRQ number that you can
> then get interrupts for by using 'request_irq()'.
>
> If you're implementing a user-space driver then you won't want to bind
> into the Linux IRQ subsystem -- instead you would open /dev/xen/evtchn,
> bind to your event-channel port, then read() or poll() your file
> descriptor. Currently only one process can have /dev/xen/evtchn open
> at any time, but I know of at least two patches to fix this, so I
> guess one of these ought to be checked in to the tree!
>
> So, yes, in short, you have to write the bit of code that you describe
> in your email. :-)
>
> -- Keir
>


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
> i manually plan to install the module passing the eventchannel port.
> as a command line argument to the module. but i need to know if a
> linux kernel module can access the xen api such as
> "bind_evtchn_to_irq".

Most Xen API functions currently are not exported. When you try to
load the module, you should get "undefined symbol ......." for each
unexported global function/variable. Find their definitions and
EXPORT_SYMBOL(name); Don't forge to include <linux/module.h> in
corresponding files.

- Bin

--
Programs should be written for people to read,
and only incidentally for machines to execute.


-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel
Re: simple backend, frontend [ In reply to ]
> Hi,
>
> Writing a custom backend driver...... can a custom backend driver be
> a module in the linux kernel or does it have to be built in?
>
> write now the backend and front end are very simple.
>
> a user level program establishes a shared event channel using -
> libxc. this part is complete.

If you mean that the user-level program creates the event channel, I
would recommend not doing that. Instead, your frontend should
allocate an unbound port that the backend can then connect to (or vice
versa). i.e., frontend does EVTCHNOP_alloc_unbound.

I guess if you are using an existing front-end then this doesn't make
sense as you need to go along with the existing protocol. However,
both blkif and netif protocols will change to the new evtchn creation
model in the near future.

> this is the plan for the next part but need some info:
>
> i manually plan to install the module passing the eventchannel port.
> as a command line argument to the module. but i need to know if a
> linux kernel module can access the xen api such as
> "bind_evtchn_to_irq".

As Bin says, some functions will need EXPORT_SYMBOL(). Bin checked in
EXPORT_SYMBOL(bind_evtchn_to_irq) earlier today.

-- Keir

> thanks.
>
>
> Deepak
>
>
>
>
> On Sun, 14 Nov 2004 15:42:44 +0000, Keir Fraser
> <keir.fraser@cl.cam.ac.uk> wrote:
> >
> >
> > > Hi,
> > >
> > > Sorry I seem to be stuck and asking similar questions.
> > >
> > > > > linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c
> > > >
> > > > That's the one in kernel users will call into.
> > >
> > > That file does not contain any code to create event channels.
> > >
> > >
> > > Do I have to write some code in Xen tht uses xen/common/event_channel.c creates
> > > an event channel on init. And then pass the port returned to some
> > > other program which passes it to the other domain?
> >
> > The 'old' model for creating event channels was that xend would create
> > them and pass each domain the id of its end. So no creation code
> > needed in XenLinux.
> >
> > The 'new' model (in which one domain creates an unbound port that the
> > other end then connects to) is rather recent and so no drivers in
> > XenLinux use it, so there's no code to steal. :-)
> >
> > evtchn.c is all about receipt and demux of events. You should create
> > your own code to create an unbound port, then you should use
> > bind_evtchn_to_irq() to get yourself a Linux IRQ number that you can
> > then get interrupts for by using 'request_irq()'.
> >
> > If you're implementing a user-space driver then you won't want to bind
> > into the Linux IRQ subsystem -- instead you would open /dev/xen/evtchn,
> > bind to your event-channel port, then read() or poll() your file
> > descriptor. Currently only one process can have /dev/xen/evtchn open
> > at any time, but I know of at least two patches to fix this, so I
> > guess one of these ought to be checked in to the tree!
> >
> > So, yes, in short, you have to write the bit of code that you describe
> > in your email. :-)
> >
> > -- Keir
> >



-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xen-devel