Changeset 45291 in vbox for trunk/include/VBox/vmm
- Timestamp:
- Apr 2, 2013 3:31:42 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84688
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/cpum.h
r45276 r45291 271 271 272 272 /** 273 * Tests if the guest has paging enabled or not. 274 * 275 * @returns true if paging is enabled, otherwise false. 276 * @param pCtx Current CPU context 277 */ 278 DECLINLINE(bool) CPUMIsGuestPagingEnabledEx(PCPUMCTX pCtx) 279 { 280 return !!(pCtx->cr0 & X86_CR0_PG); 281 } 282 283 /** 273 284 * Tests if the guest is running in PAE mode or not. 274 285 * … … 278 289 DECLINLINE(bool) CPUMIsGuestInPAEModeEx(PCPUMCTX pCtx) 279 290 { 291 #ifdef VBOX_WITH_OLD_VTX_CODE 280 292 return ( (pCtx->cr4 & X86_CR4_PAE) 281 293 && CPUMIsGuestInPagedProtectedModeEx(pCtx) 282 294 && !CPUMIsGuestInLongModeEx(pCtx)); 283 } 284 285 286 /** 287 * Tests if the guest has paging enabled or not. 288 * 289 * @returns true if paging is enabled, otherwise false. 290 * @param pCtx Current CPU context 291 */ 292 DECLINLINE(bool) CPUMIsGuestPagingEnabledEx(PCPUMCTX pCtx) 293 { 294 return !!(pCtx->cr0 & X86_CR0_PG); 295 #else 296 return ( (pCtx->cr4 & X86_CR4_PAE) 297 && CPUMIsGuestPagingEnabledEx(pCtx) 298 && !(pCtx->msrEFER & MSR_K6_EFER_LME)); 299 #endif 295 300 } 296 301
Note:
See TracChangeset
for help on using the changeset viewer.