From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [ToDo] Real Mode Support Date: Mon, 11 Feb 2008 16:20:23 +0200 Message-ID: <47B059A7.5080109@qumranet.com> References: <20080206083326.43005755@frecb000711> <47A9EF21.3050103@us.ibm.com> <47AEE385.7030306@qumranet.com> <20080211143911.37735378@frecb000711> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net To: Guillaume Thouvenin Return-path: In-Reply-To: <20080211143911.37735378@frecb000711> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Guillaume Thouvenin wrote: >>> >>> >> As using the emulator is likely to be slower than VT, we can call the >> emulator only if we are in a "VT unfriendly" state, so the code might >> look like >> >> if (vmx->rmode.active && big_real_mode(vmx)) >> ... >> >> In addition, there are some protected-mode states that VT can't handle >> (cs.rpl != ss.rpl IIRC) so we can emulate those cases as well. >> >> To improve speed, we may want to emulate >1 instruction per iteration. >> > > So the plan is to keep the usage of vm86 mode until we detect a "VT > unfriendly" state. I think about a VMentry failure to detect this kind > of state? > Yes, that's a good way. > Then, when we are in big_real_mode state, we emulate the code as > suggested by Avi with the optimisation that consists to emulate more > than one instruction per iteration. > > Yes. Note we sometimes need to emulate in protected mode as well. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/