Abhinav Srivastava
2007-Jul-14 07:16 UTC
[Xen-devel] Passing data from hypervisor to dom0 application
Hi there, I am working with Xen 3.0.3 in para-virtualized mode. I am intercepting guest virtual machines hypercalls inside the the hypervisor and trying to pass this data to dom0 monitoring application. To pass data, I shared a page between dom0 and hypervisor using alloc_hypertrace_buf function and used memcpy to write data on the shared page. To inform userspace application about the data, i used virq. The problem that i am facing in this whole process is since hypercall data is coming so fast userspace application is not able to show all the hypercalls. I am not able to think of exact reason of this behavior. Is it because of virq''s which are sent by Xen? or Xen is sending so fast that userspace application is not able to read it? or Is it some pending interrupt problem? I would really appreciate any response in this regard. If there is any other (better way) to pass such data from hypervisor to dom0 userspace then please let me know. Thanks & Regards, Abhinav --------------------------------- Heres a new way to find what you''re looking for - Yahoo! Answers --0-1473037605-1184397376=:73301 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <br>Hi there,<br><br>I am working with Xen 3.0.3 in para-virtualized mode. I am intercepting guest virtual machines hypercalls inside the the hypervisor and trying to pass this data to dom0 monitoring application. To pass data, I shared a page between dom0 and hypervisor using alloc_hypertrace_buf function and used memcpy to write data on the shared page. To inform userspace application about the data, i used virq.<br><br>The problem that i am facing in this whole process is since hypercall data is coming so fast userspace application is not able to show all the hypercalls.<br>I am not able to think of exact reason of this behavior. Is it because of virq''s which are sent by Xen? or Xen is sending so fast that userspace application is not able to read it? or Is it some pending interrupt problem?<br><br>I would really appreciate any response in this regard. If there is any other (better way) to pass such data from hypervisor to dom0 userspace then please let me know.<br><br>Thanks & Regards,<br>Abhinav<p>  <hr size=1></hr> Heres a new way to find what you''re looking for - <a href="http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/">Yahoo! Answers</a> --0-1473037605-1184397376=:73301-- --===============0516571911=Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0516571911==--
Mats Petersson
2007-Jul-14 08:57 UTC
Re: [Xen-devel] Passing data from hypervisor to dom0 application
At 08:16 14/07/2007, Abhinav Srivastava wrote:>Hi there, > >I am working with Xen 3.0.3 in para-virtualized mode. I am >intercepting guest virtual machines hypercalls inside the the >hypervisor and trying to pass this data to dom0 monitoring >application. To pass data, I shared a page between dom0 and >hypervisor using alloc_hypertrace_buf function and used memcpy to >write data on the shared page. To inform userspace application about >the data, i used virq. > >The problem that i am facing in this whole process is since >hypercall data is coming so fast userspace application is not able >to show all the hypercalls. >I am not able to think of exact reason of this behavior. Is it >because of virq''s which are sent by Xen? or Xen is sending so fast >that userspace application is not able to read it? or Is it some >pending interrupt problem?I don''t know what the problem with this approach is, but two things come to mind: 1. Using more than one buffer and/or a larger buffer would make the overhead of the user-mode application smaller, which may help. More than one buffer would help in the respect that hypervisor can go on filling the next buffer after Dom0 app is starting it''s copy, which may help to overcome any latency problems. 2. Isn''t xentrace with suitable mask able to do exactly what you want? [I have only used xentrace to follow HVM type calls, but I expect that it''s able to trace hypercalls too]. If it''s not able to do that, you may want to consider adding some tracing to the hypercalls using the xentrace method, rather than inventing your own method of tracing - unless there is some major reason for NOT using Xentrace of course. -- Mats _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel