Xen newbie: inter-domain communication
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
Quoted 1 line · 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).
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).
Quoted 1 line
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.
Signature · 8 lines
Derrik Pates [email protected] ------------------------------------------------------- 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
Quoted 5 lines
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.
Quoted 2 lines
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.
Quoted 2 lines
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).
Quoted 3 lines
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.
Quoted 3 lines
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.
Quoted 2 lines
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.
Quoted 1 line
I would appreciate any help regarding these queries.
HTH,
Mark
Quoted 8 lines
Thanks
Chotu
Quoted 8 lines
-------------------------------------------------------
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
[email protected]
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
Quoted 8 lines
Quoted 3 lines
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
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
Quoted 7 lines · Kip Macy
Quoted 6 lines
Quoted 2 lines
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.
Quoted 6 lines
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
Quoted 3 lines · Mark Williamson
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
Quoted 19 lines
Mark
Quoted 7 lines · Kip Macy
Quoted 6 lines
Quoted 2 lines
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.
Quoted 6 lines
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
Quoted 9 lines
-------------------------------------------------------
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
[email protected]
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