VirtualBox

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


Ignore:
Timestamp:
Apr 2, 2013 3:31:42 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
84688
Message:

VMM: HM bits.

File:
1 edited

Legend:

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

    r45276 r45291  
    271271
    272272/**
     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 */
     278DECLINLINE(bool)    CPUMIsGuestPagingEnabledEx(PCPUMCTX pCtx)
     279{
     280    return !!(pCtx->cr0 & X86_CR0_PG);
     281}
     282
     283/**
    273284 * Tests if the guest is running in PAE mode or not.
    274285 *
     
    278289DECLINLINE(bool)    CPUMIsGuestInPAEModeEx(PCPUMCTX pCtx)
    279290{
     291#ifdef VBOX_WITH_OLD_VTX_CODE
    280292    return (    (pCtx->cr4 & X86_CR4_PAE)
    281293            &&  CPUMIsGuestInPagedProtectedModeEx(pCtx)
    282294            &&  !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
    295300}
    296301
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