qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Xen Development Mailing List <xen-devel@lists.xensource.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RfC / Patch] xenner: event channel implementation.
Date: Wed, 22 Apr 2009 11:45:29 -0500	[thread overview]
Message-ID: <49EF49A9.2000008@codemonkey.ws> (raw)
In-Reply-To: <49EF1EE6.5080900@redhat.com>

Gerd Hoffmann wrote:
>   Hi,
>
> Merging the xen bits seems to be on a good way.  Time to look at 
> un-bitrotting the xenner bits ...
>
> Here is a first patch for comments.  Not useful on its own.  Right now 
> I'm looking more for comments on the way the integration is done.
>
> Event channels on Xen are managed by calling the xc_evtchn_* functions 
> provided by libxenctrl.  The library in turn does does hypercalls into 
> the xen kernel.  xenner obviously has to provide an alternative 
> implementation for these functions.  Also for others.  This patch 
> starts with just the event channels though.

With xenner, do you still use xenstore/xenconsoled?  If so, don't you 
need some LD_PRELOAD magic to make that work?

Regards,

Anthony Liguori

> It works this way:  There is a struct with function pointers to the 
> event channel functions.  The struct can be switched at runtime to the 
> xen or xenner version of the functions depending on the qemu operation 
> mode.
>
> The struct is named "xc_evtchn", the function pointer are named like 
> the xc_evtchn_* functions, but without the xc_evtchn_ prefix, i.e. 
> "xc_evtchn_open(...)" becomes xc_evtchn.open(...).
>
> The function calls in the source code (xen backend drivers) are not 
> changed directly, but using a include file with a bunch of #defines. 
> That way I don't have to change s/xc_evtchn_/xc_evtchn./ all over the 
> place.  Also xenner can easily be disabled at compile time and the 
> indirect function pointer calls simply go away then.
>
> Comments?
>
> cheers,
>   Gerd

  parent reply	other threads:[~2009-04-22 16:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 13:43 [Qemu-devel] [RfC / Patch] xenner: event channel implementation Gerd Hoffmann
2009-04-22 16:23 ` Avi Kivity
2009-04-23 10:30   ` Gerd Hoffmann
2009-04-28 15:00   ` Gerd Hoffmann
2009-04-22 16:45 ` Anthony Liguori [this message]
2009-04-23 10:34   ` Gerd Hoffmann

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=49EF49A9.2000008@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xensource.com \
    /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 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).