From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/4] VMX: Invalid guest state emulation Date: Mon, 18 Aug 2008 13:15:03 +0300 Message-ID: <48A94BA7.6000601@qumranet.com> References: <20080817133615.GA8743@mohd-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, riel@surriel.com, laurent.vivier@bull.net, guillaume.thouvenin@ext.bull.net To: Mohammed Gamal Return-path: Received: from il.qumranet.com ([212.179.150.194]:49715 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453AbYHRKPF (ORCPT ); Mon, 18 Aug 2008 06:15:05 -0400 In-Reply-To: <20080817133615.GA8743@mohd-laptop> Sender: kvm-owner@vger.kernel.org List-ID: Mohammed Gamal wrote: > The patch series adds invalid guest state emulation for VMX hosts, which is needed in order to properly support real mode guests. > Usually, a guest would be in an VMX-invalid state during mode switches from real to protected mode or vice versa. > We handle this invalid state by using the x86 emulator to emulate instructions until we arrive back to a VMX-friendly state. > This is achieved by: > - Adding thorough guest state checking in order to catch and handle invalid states > - Adding a guest state handler which emulates instructions till guest state is valid > - Adding an "emulation required" flag, enabled on mode switches, to indicated that emulation is needed > - Checking for guest state on vcpu_run() and emulating instructions instead of entering VMX if the state is invalid. > > The next step needed is to add more instructions to the x86 emulator, since we might run into instructions not supported yet. > In order not to interfere with normal KVM operation, a module parameter 'emulate_invalid_guest_state' -which is disabled by default- that is used in > order to drive emulation. Bear in mind that currently you can't use this patch alone to get real mode guests to work. There is still a lot of work > needed on the x86 emulator in order not to run into failures running these guests. > Thanks, all applied. -- error compiling committee.c: too many arguments to function