public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [ToDo] Real Mode Support
@ 2008-02-06  7:33 Guillaume Thouvenin
  2008-02-06  8:52 ` Izik Eidus
  2008-02-06 17:32 ` Anthony Liguori
  0 siblings, 2 replies; 11+ messages in thread
From: Guillaume Thouvenin @ 2008-02-06  7:33 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-02-11 14:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-06  7:33 [ToDo] Real Mode Support Guillaume Thouvenin
2008-02-06  8:52 ` Izik Eidus
     [not found]   ` <1202287974.23342.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-02-06 12:07     ` Guillaume Thouvenin
2008-02-06 12:52       ` Izik Eidus
2008-02-06 23:52       ` Kamble, Nitin A
2008-02-07 18:36         ` Alexey Eremenko
2008-02-06 17:32 ` Anthony Liguori
     [not found]   ` <47A9EF21.3050103-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-02-06 17:47     ` Izik Eidus
2008-02-10 11:44   ` Avi Kivity
2008-02-11 13:39     ` Guillaume Thouvenin
2008-02-11 14:20       ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox