VirtualBox

Ignore:
Timestamp:
Apr 11, 2011 10:10:38 AM (14 years ago)
Author:
vboxsync
Message:

CPUMIsGuestInRealOrV86Mode and CPUMIsGuestInRealOrV86ModeEx.

File:
1 edited

Legend:

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

    r36315 r36639  
    870870
    871871            if ((pVCpu->CTX_SUFF(pVM)->cpum.s.aGuestCpuIdStd[1].ecx & X86_CPUID_FEATURE_ECX_MONITOR) != 0)
    872                
     872
    873873                *puValue |= MSR_IA32_MISC_ENABLE_MONITOR /* if mwait/monitor available */;
    874874            /** @todo: add more cpuid-controlled features this way. */
     
    20592059
    20602060/**
     2061 * Tests if the guest is running in real or virtual 8086 mode.
     2062 *
     2063 * @returns @c true if it is, @c false if not.
     2064 * @param   pVCpu       The virtual CPU handle.
     2065 */
     2066VMMDECL(bool) CPUMIsGuestInRealOrV86Mode(PVMCPU pVCpu)
     2067{
     2068    return !(pVCpu->cpum.s.Guest.cr0 & X86_CR0_PE)
     2069        || pVCpu->cpum.s.Guest.eflags.Bits.u1VM; /** @todo verify that this cannot be set in long mode. */
     2070}
     2071
     2072
     2073/**
    20612074 * Tests if the guest is running in protected or not.
    20622075 *
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