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

Re: [Xen-devel] Hypervisor to dom0 communication



On Mon, 2012-11-12 at 21:12 +0000, Razvan Cojocaru wrote:
> Hello,
> 
> I'm interested in establishing a communication channel between the Xen
> hypervisor and a dom0 userspace application. Ideally this would be a
> 2-way channel, with the hypervisor asynchronously notifying this
> application, and then (for certain types of messages) wait for a reply
> from the userspace consumer.

Sounds a lot like the model used by the IOREQs, this is the mechanism
for dispatching MMIO emulation to the qemu process for HVM domains.

> What would you recommend for my case? Where (if anywhere) might I be
> able to find a clear, concise, example of allocating and sharing memory
> pages containing a ring buffer used for hypervisor <-> dom0 userspace
> communication (hopefully even simpler that trace.c)?

I think I'd look at the ioreq stuff in preference to the trace stuff.
You probably want to use a normal evtchn rather than VIRQ. The code
which handles HVM_PARAM_BUFIOREQ_PFN and HVM_PARAM_BUFIOREQ_EVTCHN
should give a reasonable starting point (I think, I'm not actually the
familiar with this bit of Xen).

It might also be useful if you describe your actual end-goal -- i.e.
what you are ultimately trying to achieve. It may be that there are
better approaches or even existing solutions or things which are already
close to your needs.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.