VirtualBox

Changeset 13267 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Oct 14, 2008 2:46:07 PM (16 years ago)
Author:
vboxsync
Message:

lmsw: corrected exit path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r13266 r13267  
    19261926    uint64_t OldCr0 = CPUMGetGuestCR0(pVM);
    19271927
    1928     /* don't use this path to go into protected mode! */
    1929     Assert(OldCr0 & X86_CR0_PE);
    1930     if (!(OldCr0 & X86_CR0_PE))
    1931         return VERR_EM_INTERPRETER;
    1932 
    19331928    /* Only PE, MP, EM and TS can be changed; note that PE can't be cleared by this instruction. */
    19341929    uint64_t NewCr0 = ( OldCr0 & ~(             X86_CR0_MP | X86_CR0_EM | X86_CR0_TS))
    19351930                    | (u16Data &  (X86_CR0_PE | X86_CR0_MP | X86_CR0_EM | X86_CR0_TS));
     1931
     1932    /* don't use this path to go into protected mode! */
     1933    if ((OldCr0 & X86_CR0_PE) != (NewCr0 & X86_CR0_PE))
     1934        return VERR_EM_INTERPRETER;
    19361935
    19371936    return CPUMSetGuestCR0(pVM, NewCr0);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette