xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Hypervisor to dom0 communication
@ 2012-11-12 21:12 Razvan Cojocaru
  2012-11-13  9:59 ` Ian Campbell
  0 siblings, 1 reply; 13+ messages in thread
From: Razvan Cojocaru @ 2012-11-12 21:12 UTC (permalink / raw)
  To: xen-devel

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.

To this end, I've been reading xen-devel posts [1], read the
xentrace-related Xen source code [2], and studied tools such as Ether
[3]. I've also read as much as time permitted of "The Definitive Guide
to the Xen Hypervisor" [4] book. However, I have very limited experience
as a kernel developer, and none working on the Xen hypervisor, so I'm
still digesting the information.

A particularly good choice is riding on xentrace, since that's already
been tested, has it's own tools, and it's the fastest way to get data
moving in one direction. However (putting aside the fact that it's not
bidirectional communication) the problem is that the messages I'd like
to pass to my application are longer than 28 bytes, so to be able to get
what I need I'd have to either increase the default trace buffer, or
send a message in several chunks. None of these solutions look elegant
to me.

So I'm thinking about writing a custom channel from scratch, and I'd
like to know what the best way to proceed is. I'll likely need to add a
new VIRQ like the TRACE VIRQ and use that for notifications. However,
allocating and sharing a new page is trickier. I've read about grant
tables and HYPERVISOR_grant_table_op, but trace.c simply calls
share_xen_page_with_privileged_guests(). I've read about ring buffers
and DEFINE_RING_TYPES, but trace.{h,c} has nothing to do with that
macro. Is the "The Definitive Guide to the Xen Hypervisor" book still
relevant?

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)?

What resources that would accelerate learning and facilitate Xen
enlightenment would you recommend to a developer new to the Xen hypervisor?

Thank you,
Razvan

[1]
http://old-list-archives.xen.org/archives/html/xen-devel/2008-07/msg00589.html
[2] http://code.metager.de/source/xref/xen/xen/common/trace.c
[3] http://ether.gtisc.gatech.edu/source.html
[4] http://www.amazon.com/The-Definitive-Guide-Xen-Hypervisor/dp/013234971X

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Hypervisor to dom0 communication
@ 2008-07-10 12:26 Matthew Donovan
  2008-07-11 14:47 ` Mark Williamson
  0 siblings, 1 reply; 13+ messages in thread
From: Matthew Donovan @ 2008-07-10 12:26 UTC (permalink / raw)
  To: xen-devel

 
I am working on a security tool that monitors various components (IDT, SSDT,
etc) of a domU using VM introspection.  Currently, we're using a polling
method to monitor these in-core structions.  We would like to be able to use
a blocking method instead.  I.e. specify "interesting" memory ranges and
then wait until they are modified.

How can I get the hypervisor to alert a kernel module loaded in dom0 that
something has happened?  Can the alert include extra information such as the
address that was modified?	


Thanks
-matthew

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-11-16 16:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 21:12 Hypervisor to dom0 communication Razvan Cojocaru
2012-11-13  9:59 ` Ian Campbell
2012-11-13 10:26   ` Razvan Cojocaru
2012-11-13 10:36     ` Ian Campbell
2012-11-13 10:49       ` Razvan Cojocaru
2012-11-13 11:12         ` Ian Campbell
2012-11-13 11:24           ` Razvan Cojocaru
2012-11-15 14:26             ` Steven Maresca
2012-11-15 14:37               ` Razvan Cojocaru
2012-11-16 16:51               ` Razvan Cojocaru
2012-11-15 12:10         ` Tim Deegan
  -- strict thread matches above, loose matches on Subject: below --
2008-07-10 12:26 Matthew Donovan
2008-07-11 14:47 ` Mark Williamson

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).