From 4269196da9f95bf7b99696653f34cae2ceabaea1 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Thu, 11 Jun 2015 21:52:46 +0000 Subject: [PATCH] [FAST486] The VM flag must be cleared before loading the new stack segment on a return from v86 mode. svn path=/trunk/; revision=68107 --- reactos/lib/fast486/common.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/reactos/lib/fast486/common.c b/reactos/lib/fast486/common.c index 5827339e57d..2c2a4ac2111 100644 --- a/reactos/lib/fast486/common.c +++ b/reactos/lib/fast486/common.c @@ -339,6 +339,9 @@ Fast486InterruptInternal(PFAST486_STATE State, /* Switch to the new privilege level */ State->Cpl = GET_SEGMENT_RPL(IdtEntry->Selector); + /* Clear the VM flag */ + State->Flags.Vm = FALSE; + /* Check the new (higher) privilege level */ switch (State->Cpl) { @@ -404,12 +407,6 @@ Fast486InterruptInternal(PFAST486_STATE State, } State->GeneralRegs[FAST486_REG_ESP].Long = NewEsp; - - if (State->Flags.Vm) - { - /* Clear the VM flag */ - State->Flags.Vm = FALSE; - } } /* Load new CS */