* Xen newbie: inter-domain communication
@ 2005-01-07 10:42 Chotu Ram
2005-01-08 2:59 ` Derrik Pates
2005-01-08 3:25 ` Mark Williamson
0 siblings, 2 replies; 6+ messages in thread
From: Chotu Ram @ 2005-01-07 10:42 UTC (permalink / raw)
To: xen-devel
Hi All,
I have started exploring Xen couple of weeks back and have some questions
regarding the inter-domain communication and the save/restore method used
for hibernation of domains.
1. As far as I can understand (and I might be wrong) Xen maintains two
domains dom0 (control domain) and dom1 (the other guest OSes). When the
documentation says inter-domain communication, is it only referring to the
communication between the dom0 and dom1, or it can also be applied to the
communication among the guest OSes (unprivileged that is).
2. What are the capabilities of the inter-domain communication method.
Specifically: what protocol is used to communicate?, what kind of
information can be communicated? Can this communication be used for
logging/auditing? Does anybody has any experience using this method or has
any working example?
3. When the domain save operation is done, Xen saves the memory image to a
file and then uses it back to restore the domain (with xm save/restore
commands). What is the format of this image file. Can it be read somehow to
know the status of the guest OS when it was hibernated? I am sure restore
function will read it somehow and use it to restore the domain, but any
direct way to understand it... like an example or something like that?
I would appreciate any help regarding these queries.
Thanks
Chotu
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Xen newbie: inter-domain communication
2005-01-07 10:42 Xen newbie: inter-domain communication Chotu Ram
@ 2005-01-08 2:59 ` Derrik Pates
2005-01-08 3:25 ` Mark Williamson
1 sibling, 0 replies; 6+ messages in thread
From: Derrik Pates @ 2005-01-08 2:59 UTC (permalink / raw)
To: Chotu Ram; +Cc: xen-devel
Chotu Ram wrote:
> 1. As far as I can understand (and I might be wrong) Xen maintains two
> domains dom0 (control domain) and dom1 (the other guest OSes). When the
> documentation says inter-domain communication, is it only referring to
> the communication between the dom0 and dom1, or it can also be applied
> to the communication among the guest OSes (unprivileged that is).
A "domain" is a single virtual execution space, more or less. Each
"virtual machine" is a separate domain. (When you do "xm list", the "Id"
field is the "domain ID".) So yes, an inter-domain commmunication
channel can exist between domain 0 and any other domain (running virtual
machine).
> 2. What are the capabilities of the inter-domain communication method.
> Specifically: what protocol is used to communicate?, what kind of
> information can be communicated? Can this communication be used for
> logging/auditing? Does anybody has any experience using this method or
> has any working example?
As I understand, the "protocol" is basically just a per-channel
"interrupt" (to get the other side's attention as needed), and a shared
page, which is exchanged between the two domains as needed (only one can
be interacting with it at a time, I think). The virtual block device
driver and virtual network interface driver, as I understand it,
structure it as a big ring buffer, and encode messages (and assign pages
of their allocated memory to the other side of the channel for a
DMA-like exchange method) in that ring buffer. Look at the developer
documentation for a better explanation.
--
Derrik Pates
dpates@dsdk12.net
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Xen newbie: inter-domain communication
2005-01-07 10:42 Xen newbie: inter-domain communication Chotu Ram
2005-01-08 2:59 ` Derrik Pates
@ 2005-01-08 3:25 ` Mark Williamson
2005-01-08 3:52 ` Kip Macy
1 sibling, 1 reply; 6+ messages in thread
From: Mark Williamson @ 2005-01-08 3:25 UTC (permalink / raw)
To: xen-devel; +Cc: Chotu Ram
> 1. As far as I can understand (and I might be wrong) Xen maintains two
> domains dom0 (control domain) and dom1 (the other guest OSes). When the
> documentation says inter-domain communication, is it only referring to the
> communication between the dom0 and dom1, or it can also be applied to the
> communication among the guest OSes (unprivileged that is).
As another poster said a "domain" is the execution context a virtual machine
runs in, similar to how a "process" is the execution context a UNIX program
runs in. Each VM exists in it's own domain.
Domain 0 is a special case - it's the domain that happens to get control of
the real physical hardware. "Domain 1" is a colloquial term we often use to
refer to a domain that isn't dom0 ;-)
There are various kinds of "Interdomain communication".
1) the virtual network interface
2) the virtual block interface
3) the control interface
Each of these uses an "event channel" (inter-domain interrupt) and page of
shared memory. Each has its own protocol. Other types of interface will use
their own protocol, as suited to that device.
Typically these occur between dom0 and other domains. More complicated
connectivity might occur, e.g. if you're using driver domains.
> 2. What are the capabilities of the inter-domain communication method.
> Specifically: what protocol is used to communicate?,
Each interface uses a ring buffer into which small messages are inserted.
These messages are defined as structs in the header files in
xen/include/public/io/, which basically define much of the protocol.
You'd have to look at the source for the netif / blkif / ctrlif drivers to see
how it all works.
For the network and block interfaces, the information in these messages is
used to direct DMA transfers directly into / out of guest memory.
> what kind of
> information can be communicated?
For block and net, information required to do the main IO transfer. The
control interface is used for generic control messaging (setting up devices,
transferring console data, blah).
> Can this communication be used for
> logging/auditing? Does anybody has any experience using this method or has
> any working example?
I seem to remember somebody was working on a secure logging framework. I
don't know how they're getting on, though.
> 3. When the domain save operation is done, Xen saves the memory image to a
> file and then uses it back to restore the domain (with xm save/restore
> commands). What is the format of this image file.
There's not an official spec, I'm afraid you'd have to look at the suspend
code to figure out how the files are structured.
> Can it be read somehow to
> know the status of the guest OS when it was hibernated?
Possible in principle. One might (for instance) construct a tool that'd
convert a suspend file into a core file, which you could then inspect using
GDB. Don't think this has been done, though.
> I would appreciate any help regarding these queries.
HTH,
Mark
>
> Thanks
>
> Chotu
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Xen newbie: inter-domain communication
2005-01-08 3:25 ` Mark Williamson
@ 2005-01-08 3:52 ` Kip Macy
2005-01-08 3:56 ` Mark Williamson
0 siblings, 1 reply; 6+ messages in thread
From: Kip Macy @ 2005-01-08 3:52 UTC (permalink / raw)
To: Mark Williamson; +Cc: xen-devel, Chotu Ram
>
> > Can it be read somehow to
> > know the status of the guest OS when it was hibernated?
>
> Possible in principle. One might (for instance) construct a tool that'd
> convert a suspend file into a core file, which you could then inspect using
> GDB. Don't think this has been done, though.
>
This is something I need to do for in-house purposes in any event. I'll
try to do it next week if I can get some assurance that the changes will
be promptly committed.
-Kip
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Xen newbie: inter-domain communication
2005-01-08 3:52 ` Kip Macy
@ 2005-01-08 3:56 ` Mark Williamson
2005-01-08 4:07 ` Kip Macy
0 siblings, 1 reply; 6+ messages in thread
From: Mark Williamson @ 2005-01-08 3:56 UTC (permalink / raw)
To: Kip Macy; +Cc: Mark Williamson, xen-devel, Chotu Ram
Is it good enough for your purposes to reprocess a suspend file, or will you
be core dumping from the domain's memory image? I'd have thought the latter
would better suited to debugging usage.
Mark
On Saturday 08 January 2005 03:52, Kip Macy wrote:
> > > Can it be read somehow to
> > > know the status of the guest OS when it was hibernated?
> >
> > Possible in principle. One might (for instance) construct a tool that'd
> > convert a suspend file into a core file, which you could then inspect
> > using GDB. Don't think this has been done, though.
>
> This is something I need to do for in-house purposes in any event. I'll
> try to do it next week if I can get some assurance that the changes will
> be promptly committed.
>
>
> -Kip
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Xen newbie: inter-domain communication
2005-01-08 3:56 ` Mark Williamson
@ 2005-01-08 4:07 ` Kip Macy
0 siblings, 0 replies; 6+ messages in thread
From: Kip Macy @ 2005-01-08 4:07 UTC (permalink / raw)
To: Mark Williamson; +Cc: xen-devel, Chotu Ram
On Sat, 8 Jan 2005, Mark Williamson wrote:
> Is it good enough for your purposes to reprocess a suspend file, or will you
> be core dumping from the domain's memory image? I'd have thought the latter
> would better suited to debugging usage.
Last time I looked at the suspend code it looked very linux specific.
I need something more generic. Hence I'm inclined to choose the latter.
-Kip
>
> Mark
>
> On Saturday 08 January 2005 03:52, Kip Macy wrote:
> > > > Can it be read somehow to
> > > > know the status of the guest OS when it was hibernated?
> > >
> > > Possible in principle. One might (for instance) construct a tool that'd
> > > convert a suspend file into a core file, which you could then inspect
> > > using GDB. Don't think this has been done, though.
> >
> > This is something I need to do for in-house purposes in any event. I'll
> > try to do it next week if I can get some assurance that the changes will
> > be promptly committed.
> >
> >
> > -Kip
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
>
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-01-08 4:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-07 10:42 Xen newbie: inter-domain communication Chotu Ram
2005-01-08 2:59 ` Derrik Pates
2005-01-08 3:25 ` Mark Williamson
2005-01-08 3:52 ` Kip Macy
2005-01-08 3:56 ` Mark Williamson
2005-01-08 4:07 ` Kip Macy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.