[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RfC / Patch] xenner: event channel implementation.

From: Gerd Hoffmann
Subject: [Qemu-devel] [RfC / Patch] xenner: event channel implementation.
Date: Wed, 22 Apr 2009 15:43:02 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090324 Fedora/3.0-2.1.beta2.fc11 Thunderbird/3.0b2


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.

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.



Attachment: 0005-xenner-event-channel-implementation.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]