Changeset 36639 in vbox
- Timestamp:
- Apr 11, 2011 10:10:38 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/VBox/vmm/cpum.h (modified) (2 diffs)
-
src/VBox/VMM/VMMAll/CPUMAllRegs.cpp (modified) (2 diffs)
-
src/VBox/VMM/VMMAll/PGMAllPhys.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r35994 r36639 181 181 VMMDECL(bool) CPUMIsGuestR0WriteProtEnabled(PVMCPU pVCpu); 182 182 VMMDECL(bool) CPUMIsGuestInRealMode(PVMCPU pVCpu); 183 VMMDECL(bool) CPUMIsGuestInRealOrV86Mode(PVMCPU pVCpu); 183 184 VMMDECL(bool) CPUMIsGuestInProtectedMode(PVMCPU pVCpu); 184 185 VMMDECL(bool) CPUMIsGuestInPagedProtectedMode(PVMCPU pVCpu); … … 197 198 { 198 199 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 */ 208 VMMDECL(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. */ 199 212 } 200 213 -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r36315 r36639 870 870 871 871 if ((pVCpu->CTX_SUFF(pVM)->cpum.s.aGuestCpuIdStd[1].ecx & X86_CPUID_FEATURE_ECX_MONITOR) != 0) 872 872 873 873 *puValue |= MSR_IA32_MISC_ENABLE_MONITOR /* if mwait/monitor available */; 874 874 /** @todo: add more cpuid-controlled features this way. */ … … 2059 2059 2060 2060 /** 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 */ 2066 VMMDECL(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 /** 2061 2074 * Tests if the guest is running in protected or not. 2062 2075 * -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r36009 r36639 544 544 { 545 545 /* Lazy approach: check all pages in the 2 MB range. 546 * The whole range must be ram and unallocated. */ 546 * The whole range must be ram and unallocated. */ 547 547 GCPhys = GCPhysBase; 548 548 unsigned iPage;
Note:
See TracChangeset
for help on using the changeset viewer.

