From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sander van Leeuwen Subject: Re: KVM & VMX root mode Date: Mon, 03 Sep 2007 10:09:04 +0200 Message-ID: <46DBC120.3050301@innotek.de> References: <46D81156.8050100@innotek.de> <46D97669.7050609@qumranet.com> <46D980C2.3040501@innotek.de> <46D98C53.4070604@qumranet.com> <46D9A030.1020904@innotek.de> <46D9B297.5070502@qumranet.com> <20070903031403.GA16190@redhat.com> <46DBB7C1.60708@innotek.de> <46DBBB65.3020406@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0644462121==" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <46DBBB65.3020406-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --===============0644462121== Content-Type: multipart/alternative; boundary="------------030603020202000206070907" This is a multi-part message in MIME format. --------------030603020202000206070907 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Avi Kivity wrote: > Sander van Leeuwen wrote: > >> You are mistaken. VT-x allows multiple clients to work concurrently. >> There's only one catch: all those >> clients should follow certain guidelines. >> > > Currently, kvm assumes that it is the only user that issues vmptrld > instructions. There may me other such assumptions in the code. > > There is also the question of who issues the vmxon/vmxoff instructions > and set the magic msr bits that enable kvm. You can't have two > hypervisors doing that; that would be racy. It should be possible to > abstract those bits out to something outside kvm, but I don't see that > happening. > > VirtualBox currently always executes vmxon when it wants to execute some guest code. When leaving ring 0 it issues the corresponding vmxoff. While that may increase world switch overhead, it has not turned out to be an issue for us. I think it's a bit risky to use somebody else's vmxon pointer. You have a point with the msr updates though. -- Kind regards / mit freundlichen Gruessen / Met vriendelijke groet Sander van Leeuwen innoTek GmbH http://www.innotek.de Germany --------------030603020202000206070907 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=ISO-8859-1 Avi Kivity wrote:
Sander van Leeuwen wrote:
  
You are mistaken. VT-x allows multiple clients to work concurrently.
There's only one catch: all those
clients should follow certain guidelines.
    

Currently, kvm assumes that it is the only user that issues vmptrld
instructions.  There may me other such assumptions in the code.

There is also the question of who issues the vmxon/vmxoff instructions
and set the magic msr bits that enable kvm.  You can't have two
hypervisors doing that; that would be racy.  It should be possible to
abstract those bits out to something outside kvm, but I don't see that
happening.

  
VirtualBox currently always executes vmxon when it wants to execute some guest code. When leaving
ring 0 it issues the corresponding vmxoff. While that may increase world switch overhead, it has not turned
out to be an issue for us. I think it's a bit risky to use somebody else's vmxon pointer.

You have a point with the msr updates though.


-- 
Kind regards / mit freundlichen Gruessen / Met vriendelijke groet
  Sander van Leeuwen

innoTek GmbH
http://www.innotek.de
Germany 
--------------030603020202000206070907-- --===============0644462121== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --===============0644462121== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============0644462121==--