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-devel

RE: [Xen-devel] Fast inter-VM signaling using monitor/mwait

To: Michael Abd-El-Malek <mabdelmalek@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Fast inter-VM signaling using monitor/mwait
From: Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>
Date: Tue, 21 Apr 2009 04:19:06 +0100
Accept-language: en-US
Acceptlanguage: en-US
Cc: Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>
Delivery-date: Mon, 20 Apr 2009 20:19:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <F4E6A08B-E8A4-425B-A8FD-46A16D882A65@xxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <F4E6A08B-E8A4-425B-A8FD-46A16D882A65@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnB37e1c0/OZFtaT1q2Z4oPkzzTLwAEeuFg
Thread-topic: [Xen-devel] Fast inter-VM signaling using monitor/mwait
> The mwait instruction is privileged.  So I added a new hypercall that
> wraps access to the mwait instruction.  Thus, my code has a Xen
> component (the new hypercall) and a guest kernel component (code for
> executing the hypercall and for turning off/on the timer interrupts
> around the hypercall).  For this code to be merged into Xen, it would
> need to add security checks and check whether the processor supports
> such a feature.

I seem to recall that some newer CPUs have an mwait instruction accessible from 
ring3, using a different opcode -- you might want to check this out.

How do you deal with atomicity of the monitor and mwait? i.e. how do you stop 
the hypervisor pre-empting the VM and using monitor for its own purposes or 
letting another guest use it?

Have you thought about HVM guests as well as PV? 

Best,
Ian

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel