Changeset 4207 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 17, 2007 8:11:37 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r4071 r4207 1505 1505 return cpl; 1506 1506 } 1507 1508 1509 /** 1510 * Gets the current guest CPU mode. 1511 * 1512 * If paging mode is what you need, check out PGMGetGuestMode(). 1513 * 1514 * @returns The CPU mode. 1515 * @param pVM The VM handle. 1516 */ 1517 CPUMDECL(uint32_t) CPUMGetGuestMode(PVM pVM) 1518 { 1519 CPUMMODE enmMode; 1520 if (!(pVM->cpum.s.Guest.cr0 & X86_CR0_PE)) 1521 enmMode = CPUMMODE_REAL; 1522 else //GUEST64 if (!(pVM->cpum.s.Guest.efer & MSR_K6_EFER_LMA) 1523 enmMode = CPUMMODE_PROTECTED; 1524 //GUEST64 else 1525 //GUEST64 enmMode = CPUMMODE_LONG; 1526 1527 return enmMode; 1528 } 1529 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r4071 r4207 1315 1315 /** 1316 1316 * Gets the current guest paging mode. 1317 * 1318 * If you just need the CPU mode (real/protected/long), use CPUMGetGuestMode(). 1317 1319 * 1318 1320 * @returns The current paging mode.
Note:
See TracChangeset
for help on using the changeset viewer.