All of lore.kernel.org
 help / color / mirror / Atom feed
From: Georgios Portokalidis <georgios.portokalidis@gmail.com>
To: Keir Fraser <keir.fraser@cl.cam.ac.uk>
Cc: Deepak Manohar <mjdeepak@gmail.com>,
	mark.williamson@cl.cam.ac.uk, andrew.warfield@cl.cam.ac.uk,
	xen-devel@lists.sourceforge.net
Subject: Re: simple backend, frontend
Date: Thu, 18 Nov 2004 17:45:45 +0000	[thread overview]
Message-ID: <ef73505041118094561031fbb@mail.gmail.com> (raw)
In-Reply-To: <E1CUXpQ-0003dP-00@mta1.cl.cam.ac.uk>

I have actually written some code for xen & xend allowing you to
request the creation of an event channel and share a memory page. It's
still work in progress, but it works fine. No crashes, very simple
communication scheme.

It's not in the repository, since i don't have access to it yet. But
I'm working with Rolf in IRC, so i guess it will eventually get there.

The only possible problem i believe is the
ctrl_if_register_receiver(). I think you can only register a single
receiver for each control message type per domain. So even with a
generic shared channel mechanism you will be able to use it just from
a single driver/module.

George P.

On Wed, 17 Nov 2004 21:59:04 +0000, Keir Fraser
<keir.fraser@cl.cam.ac.uk> wrote:
> > 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
>


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

  reply	other threads:[~2004-11-18 17:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-11 15:37 simple backend, frontend Deepak Manohar
2004-11-11 16:07 ` Mark A. Williamson
2004-11-11 16:18   ` Andrew Warfield
2004-11-11 19:21     ` Deepak Manohar
2004-11-11 19:33       ` Andrew Warfield
2004-11-11 20:11         ` Steven smith
2004-11-11 21:49       ` Mark A. Williamson
2004-11-12  8:22       ` Keir Fraser
2004-11-12 21:03         ` Deepak Manohar
2004-11-12 21:30           ` Mark A. Williamson
2004-11-14 15:34             ` Deepak Manohar
2004-11-14 15:42               ` Keir Fraser
2004-11-17 18:27                 ` Deepak Manohar
2004-11-17 19:49                   ` Bin Ren
2004-11-17 21:59                   ` Keir Fraser
2004-11-18 17:45                     ` Georgios Portokalidis [this message]
2004-11-18 17:50                       ` Keir Fraser
2004-11-18 17:57                         ` Georgios Portokalidis
2004-11-12 23:54         ` Adam Heath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef73505041118094561031fbb@mail.gmail.com \
    --to=georgios.portokalidis@gmail.com \
    --cc=andrew.warfield@cl.cam.ac.uk \
    --cc=keir.fraser@cl.cam.ac.uk \
    --cc=mark.williamson@cl.cam.ac.uk \
    --cc=mjdeepak@gmail.com \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.