On Sun, 10 Feb 2008 13:44:05 +0200
Avi Kivity <[EMAIL PROTECTED]> wrote:

> Anthony Liguori wrote:
> > So what we would like to do, is instead of setting up vm86 mode for the 
> > guest to execute real mode, use x86_emulate() to just emulate the code.  
> > This means that we wouldn't be using the "vmlaunch" instruction when in 
> > real mode and instead would be doing an x86_emulate() loop.
> >   
> 
> 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?

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.

Best regards,
Guillaume

-------------------------------------------------------------------------
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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to