VirtualBox

Changeset 45291 in vbox for trunk/src


Ignore:
Timestamp:
Apr 2, 2013 3:31:42 PM (12 years ago)
Author:
vboxsync
Message:

VMM: HM bits.

Location:
trunk/src/VBox/VMM
Files:
3 edited

Legend:

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

    r45276 r45291  
    24122412VMMDECL(bool) CPUMIsGuestInPAEMode(PVMCPU pVCpu)
    24132413{
     2414#ifdef VBOX_WITH_OLD_VTX_CODE
    24142415    return (pVCpu->cpum.s.Guest.cr4 & X86_CR4_PAE)
    24152416        && (pVCpu->cpum.s.Guest.cr0 & (X86_CR0_PE | X86_CR0_PG)) == (X86_CR0_PE | X86_CR0_PG)
    24162417        && !(pVCpu->cpum.s.Guest.msrEFER & MSR_K6_EFER_LMA);
     2418#else
     2419    return (pVCpu->cpum.s.Guest.cr4 & X86_CR4_PAE)
     2420        && (pVCpu->cpum.s.Guest.cr0 & X86_CR0_PG)
     2421        && !(pVCpu->cpum.s.Guest.msrEFER & MSR_K6_EFER_LME);
     2422#endif
    24172423}
    24182424
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r45240 r45291  
    23922392{
    23932393    /*
    2394      * The VMM device heap is a requirement for emulating real mode or protected mode without paging
     2394     * The VMM device heap is a requirement for emulating real-mode or protected-mode without paging
    23952395     * when the unrestricted guest execution feature is missing (VT-x only).
    23962396     */
    2397     if (    pVM->hm.s.vmx.fEnabled
    2398         &&  !pVM->hm.s.vmx.fUnrestrictedGuest
    2399         &&  !CPUMIsGuestInPagedProtectedModeEx(pCtx)
    2400         &&  !PDMVmmDevHeapIsEnabled(pVM)
    2401         &&  (pVM->hm.s.fNestedPaging || CPUMIsGuestInRealModeEx(pCtx)))
     2397#ifdef VBOX_WITH_OLD_VTX_CODE
     2398    if (   pVM->hm.s.vmx.fEnabled
     2399        && !pVM->hm.s.vmx.fUnrestrictedGuest
     2400        && !CPUMIsGuestInPagedProtectedModeEx(pCtx)
     2401        && !PDMVmmDevHeapIsEnabled(pVM)
     2402        && (pVM->hm.s.fNestedPaging || CPUMIsGuestInRealModeEx(pCtx)))
    24022403        return true;
     2404#else
     2405    if (   pVM->hm.s.vmx.fEnabled
     2406        && !pVM->hm.s.vmx.fUnrestrictedGuest
     2407        && CPUMIsGuestInRealModeEx(pCtx)
     2408        && !PDMVmmDevHeapIsEnabled(pVM))
     2409        return true;
     2410#endif
    24032411
    24042412    return false;
  • trunk/src/VBox/VMM/include/HMInternal.mac

    r44771 r45291  
    1515;
    1616
     17%ifdef VBOX_WITH_OLD_VTX_CODE
    1718%define VMX_USE_CACHED_VMCS_ACCESSES
     19%else
     20%if HC_ARCH_BITS == 32
     21%ifndef VBOX_WITH_HYBRID_32BIT_KERNEL
     22%define VMX_USE_CACHED_VMCS_ACCESSES
     23%endif  ; VBOX_WITH_HYBRID_32BIT_KERNEL
     24%endif   ; HC_ARCH_BITS == 32
     25%endif    ; VBOX_WITH_OLD_VTX_CODE
     26
    1827%define VBOX_WITH_AUTO_MSR_LOAD_RESTORE
    1928
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