Praveen Kushwaha
2007-Mar-21 09:47 UTC
[Xen-users] Adding interface for communication between HVM guest and xen VMM
Hi, I have a question regarding communication between HVM guest and xen VMM. As per my knowledge the communication between HVM Guest OS (windows) and VMM is done through ''VMExit'' and ''VMEntry'' operations and context is stored in VMCS. Since there are no interfaces for communication in full virtualization as there are interfaces (i.e.hypercalls) in case of para virtualization. So my question is that, In case of full virtualization, is it possible to add interfaces that will be serving as a communication medium between HVM guest and VMM? Also is there any other mechanism through which HVM guest and VMM can communicate? If anyone have knowledge regarding it please reply. Thanks, Praveen Kushwaha _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-Mar-22 09:46 UTC
[Xen-devel] RE: [Xen-users] Adding interface for communication between HVM guest and xen VMM
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Praveen Kushwaha > Sent: 21 March 2007 09:48 > To: xen-users@lists.xensource.com; xen-devel@lists.xensource.com > Subject: [Xen-users] Adding interface for communication > between HVM guest and xen VMM > > Hi, > > I have a question regarding communication between > HVM guest and xen VMM. As per my knowledge the communication > between HVM Guest OS (windows) and VMM is done through > ''VMExit'' and ''VMEntry'' operations and context is stored in > VMCS. Since there are no interfaces for communication in full > virtualization as there are interfaces (i.e.hypercalls) in > case of para virtualization. So my question is that, In case > of full virtualization, is it possible to add interfaces that > will be serving as a communication medium between HVM guest and VMM? > > Also is there any other mechanism through which HVM guest and > VMM can communicate?Yes, there are several ways to do this. The following are to some extent used in Xen: 1. Both Intel and AMD support a VM[M]CALL instruction, which allows the Guest to call into the hypervisor. Arguemnts to this instruction can be placed on the stack or in register(s) or a combination of those two. This is implemented in Xen for the purpose of supporting Para-virtual drivers in Xen. 2. Page-fault on a given "special" address (range). I.e. if the guest writes (or reads) some special address, it causes a fault into the hypervisor which is then checking for the special address. This is used for hardware emulation of memory mapped IO devices for example. 3. CPUID instruction using a "index" that isn''t implemented for hardware. I believe Xen uses CPUID 0x40000000 + x, where x is a small integer. This can be used to transfer information from the hypervisor, whereas on real hardware it''s a "no-op" (it doesn''t trap or fault if you give it an unused index, it just sets the output registers to zeros (although this particular behavious isn''t strictly documented, it''s empirically found to be the case for both AMD and Intel CPU''s for all models that support CPUID instruction). [And a note on your terminology: VMCS is the Intel form - AMD uses something called VMCB. Both serve the same purpose, and they are pretty similar in structure. There is a slight difference in that VMCS can only be accessed [legally] through a special set of VMWRITE/VMREAD instructions, whilst the VMCB can be accesses through any regular memory operation] -- Mats> > If anyone have knowledge regarding it please reply. > > > > Thanks, > > Praveen Kushwaha > > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel