WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-devel] RE: [Xen-users] Adding interface for communication between H

To: "Praveen Kushwaha" <praveen.kushwaha@xxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] RE: [Xen-users] Adding interface for communication between HVM guest and xen VMM
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Thu, 22 Mar 2007 10:46:55 +0100
Delivery-date: Thu, 22 Mar 2007 02:46:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <0A8CFEC45B7F4C419F7543867C4744237BE9C8@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdrnfcLgdkRk43tRze6d853uWZWrAAx58Rg
Thread-topic: [Xen-users] Adding interface for communication between HVM guest and xen VMM
> -----Original Message-----
> From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Praveen Kushwaha
> Sent: 21 March 2007 09:48
> To: xen-users@xxxxxxxxxxxxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>