Hello,

  I read on the kvmwiki/TODO that there is a work in progress for
extending x86 emulator to support more instructions in real mode and for
changing the execution loop to call the emulator for real mode. 

  As I'm interested to work on this part I'd like to know what was
already done.

  I'd like to have more information about how the execution loop need to
be changed. Currently we enter/leave real mode through a call to 
enter_rmode()/enter_pmode(). The function sets a variable
"arch.rmode.active" and also sets the bit X86_EFLAGS_VM of
GUEST_RFLAGS. That means that we are using the VM mode to virtualize
the real mode. I know that in virtual mode some instructions can not be
used as they are in full real mode (that would have been too easy). So
these instructions generate a protection fault and need to be emulated.
So we handle this kind of exception in handle_exception() and we call
the x86 emulator. From the emulator we read the eflags
(kvm_x86_ops->get_rflags(vcpu)) and we can know if we are in real mode
or not. It's the current scheme, right?

  My question is why the execution loop needs to be changed here. I mean
isn't it possible to just extend x86 emulator to support more
instructions in real mode? I think that I'm missing something here so
any help, hint, advice, link are welcome. 

Best Regards,

-- 
Guillaume Thouvenin

-------------------------------------------------------------------------
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