VirtualBox

Changeset 36639 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Apr 11, 2011 10:10:38 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71105
Message:

CPUMIsGuestInRealOrV86Mode and CPUMIsGuestInRealOrV86ModeEx.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/cpum.h

    r35994 r36639  
    181181VMMDECL(bool)       CPUMIsGuestR0WriteProtEnabled(PVMCPU pVCpu);
    182182VMMDECL(bool)       CPUMIsGuestInRealMode(PVMCPU pVCpu);
     183VMMDECL(bool)       CPUMIsGuestInRealOrV86Mode(PVMCPU pVCpu);
    183184VMMDECL(bool)       CPUMIsGuestInProtectedMode(PVMCPU pVCpu);
    184185VMMDECL(bool)       CPUMIsGuestInPagedProtectedMode(PVMCPU pVCpu);
     
    197198{
    198199    return !(pCtx->cr0 & X86_CR0_PE);
     200}
     201
     202/**
     203 * Tests if the guest is running in real or virtual 8086 mode.
     204 *
     205 * @returns @c true if it is, @c false if not.
     206 * @param   pCtx    Current CPU context
     207 */
     208VMMDECL(bool) CPUMIsGuestInRealOrV86ModeEx(PCPUMCTX pCtx)
     209{
     210    return !(pCtx->cr0 & X86_CR0_PE)
     211        || pCtx->eflags.Bits.u1VM; /** @todo verify that this cannot be set in long mode. */
    199212}
    200213
Note: See TracChangeset for help on using the changeset viewer.

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