I''m making a patch to watch the security of DomU. i''ve done a patch that print to the xm dmesg the result of some interception of SystemCall and Hypercall. with "printk". I want to send some data outside Xen in real-time, to a device or any port. Which is the best way to send data from the hypervision to a deamon running on Dom0? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
There are a number of programs in the tools/ directory which communicate directly with Xen. It generally involves: * Xen setting up a page to write data into. A ring structure with producer/consumer pointers is pretty standard * A way for dom0 to find out the page and map it * An event channel to wake the guest program up when there''s data in the ring. You can look at tools/xentrace.c and xen/common/trace.c for an example. -George On Sat, Sep 4, 2010 at 9:12 AM, Carlo Maiero <zesster@gmail.com> wrote:> I''m making a patch to watch the security of DomU. > i''ve done a patch that print to the xm dmesg the result of some interception > of SystemCall and Hypercall. > with "printk". > I want to send some data outside Xen in real-time, to a device or any port. > Which is the best way to send data > from the hypervision to a deamon running on Dom0? > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>> I''m making a patch to watch the security of DomU. >> i''ve done a patch that print to the xm dmesg the result of someinterception>> of SystemCall and Hypercall. >> with "printk". >> I want to send some data outside Xen in real-time, to a device or anyport.>> Which is the best way to send data >> from the hypervision to a deamon running on Dom0?>There are a number of programs in the tools/ directory which >communicate directly with Xen. It generally involves: >* Xen setting up a page to write data into. A ring structure with >producer/consumer pointers is pretty standard >* A way for dom0 to find out the page and map it >* An event channel to wake the guest program up when there''s data in thering.>You can look at tools/xentrace.c and xen/common/trace.c for an example.I''ve looked to the files and the "definitive" standard guide to the xen Hypervision, and i''m a bit confused. The standard way to exchange data makes a device_channel from domX to domY. so we have a page in the shared memory. but I''ve to send messages from xend to a daemon running on the same machine (dom0). maybe i''ve to start step by step, how can i set up the ring? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, Sep 10, 2010 at 4:09 PM, Carlo Maiero <zesster@gmail.com> wrote:> I''ve looked to the files and the "definitive" standard guide to the xen > Hypervision, > and i''m a bit confused. > The standard way to exchange data makes a device_channel from domX to domY. > so we have a page in the shared memory. > but I''ve to send messages from xend to a daemon running on the same machine > (dom0). > maybe i''ve to start step by step, how can i set up the ring?I''m afraid I really can''t give you any more than what I''ve said already: * Define a ring structure for the page. (Lots of examples around the code.) * Have Xen allocate the page. * Have a way for your dom0 daemon to ask Xen what the mfn of the page is * Have the daemon map the page * Have an event channel so Xen can wake the dom0 daemon when there''s data to read Open source projects mean coders need to be able to read and imitate existing code, without much guidance. We''ll point you in the right direction if we can, but you''ll have to make most of the progress yourself. -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel