[NTOS/PERF]: Enable VME support. VME stands for Virtual 8086 Mode Extensions, and...
authorSir Richard <sir_richard@svn.reactos.org>
Wed, 27 Jan 2010 05:34:38 +0000 (05:34 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Wed, 27 Jan 2010 05:34:38 +0000 (05:34 +0000)
commit532aff4429ee9940700c821bfbea079412bdf05f
tree3932bf4606a15edad9bd9d14bdd1867004ae5ce5
parent0aaa1fd76516aec290c1dfd7cdb2589fdd233746
[NTOS/PERF]: Enable VME support. VME stands for Virtual 8086 Mode Extensions, and it's an Intel optimization that makes changes to the IF bit in EFLAGS (CLI, STI, INT, IRETD, PUSHF, POPF) completely transprent: instead of changing the real (protected) bit, which requires the OS to trap and emulate the behavior, the CPU sets a "Fake" IF bit instead. When you're dong in V8086 mode, you simply update your real flag with whatever the fake flag says.
[NTOS]: Enable V8086 Fast-V86 Trap mode for Trap 6 (Invalid Opcode). Because we are now taking zero traps during V8086 mode, we can't do the "BOP lookahead", so the only trap we do get is when we hit the BOP/invalid opcode itself.
[NTOS]: Multiple fixes to V8086 opcode emulation code that I noticed while looking through the source. Also multiple fixes to VDM code.
This change will only impact real hardware and VMWare, since QEMU does not support VME. On VMWare, performance increased up to 400% during bootup (80 million cycles instead of 300 million, in one test).

svn path=/trunk/; revision=45282
reactos/ntoskrnl/ke/i386/traphdlr.c
reactos/ntoskrnl/ke/i386/v86vdm.c
reactos/ntoskrnl/vdm/vdmexec.c
reactos/ntoskrnl/vdm/vdmmain.c