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] [PATCH 06/16] vmx: nest: handling VMX instruction exits

To: "Dong, Eddie" <eddie.dong@xxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, "He, Qing" <qing.he@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 06/16] vmx: nest: handling VMX instruction exits
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 15 Sep 2010 08:31:13 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 15 Sep 2010 00:32:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1A42CE6F5F474C41B63392A5F80372B22A8C214A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActTNEZ5CcR+hpA2QfCxDoBGzzlciwBTwKVQAAdoRo4AABtfUAABqG4k
Thread-topic: [Xen-devel] [PATCH 06/16] vmx: nest: handling VMX instruction exits
User-agent: Microsoft-Entourage/12.26.0.100708
On 15/09/2010 07:49, "Dong, Eddie" <eddie.dong@xxxxxxxxx> wrote:

>> What is wrong with simply extending x86_emulate to handle these
>> VMX-related instructions? We've dealt with emulators provided by
>> Intel guys in the past and frankly they were full of holes.
>> 
> Certainly fine to move those VMX instruction emulation to hvm/emulate.c as if
> you don't think that is VMX specific :)

It's the right place to put all instruction emulation, if at all possible.
You will then presumably require at least one or two call-back hooks to
caller context, at least to read/write VMCS, and that would be the place to
determine whether these VMX instructions are executable. For example, SVM
and PV emulation contexts would either leave the VMX callback hooks as NULL,
and/or there will be checks for is-nested-VMX-guest in the VMX callback
hooks, injecting #UD otherwise.

The main trick with x86_emulate extensions is determining the correct neat
small set of callback hooks to add, which is somewhat driven by deciding
what should be emulated within x86_emulate and what should be left without
for implementation in the caller's context.

 -- Keir



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

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