VirtualBox

Changeset 91275 in vbox


Ignore:
Timestamp:
Sep 16, 2021 11:13:11 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146935
Message:

VMM: Added missing features checks while constructing mask of valid CR4 bits.

Location:
trunk
Files:
3 edited

Legend:

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

    r91274 r91275  
    10371037    /** Supports physical address extension (PAE). */
    10381038    uint32_t        fPae : 1;
     1039    /** Supports page-global extension (PGE). */
     1040    uint32_t        fPge : 1;
    10391041    /** Page attribute table (PAT) support (page level cache control). */
    10401042    uint32_t        fPat : 1;
     
    11591161
    11601162    /** Alignment padding / reserved for future use. */
    1161     uint32_t        fPadding : 8;
     1163    uint32_t        fPadding : 7;
    11621164
    11631165    /** SVM: Supports Nested-paging. */
  • TabularUnified trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r91273 r91275  
    23162316    uint64_t fMask = X86_CR4_VME | X86_CR4_PVI
    23172317                   | X86_CR4_TSD | X86_CR4_DE
    2318                    | X86_CR4_PSE | X86_CR4_PAE /** @todo r=bird: PAE isn't a given either, we must check features. See als PAEmode. */
    2319                    | X86_CR4_MCE | X86_CR4_PGE
    2320                    | X86_CR4_PCE
    2321                    | X86_CR4_OSXMMEEXCPT;  /** @todo r=ramshankar: Introduced in Pentium III along with SSE. Check fSse here? */
     2318                   | X86_CR4_MCE | X86_CR4_PCE;
     2319    if (pGuestFeatures->fPae)
     2320        fMask |= X86_CR4_PAE;
     2321    if (pGuestFeatures->fPge)
     2322        fMask |= X86_CR4_PGE;
     2323    if (pGuestFeatures->fPse)
     2324        fMask |= X86_CR4_PSE;
    23222325    if (pGuestFeatures->fFxSaveRstor)
    23232326        fMask |= X86_CR4_OSFXSR;
     
    23302333    if (pGuestFeatures->fFsGsBase)
    23312334        fMask |= X86_CR4_FSGSBASE;
     2335    if (pGuestFeatures->fSse)
     2336        fMask |= X86_CR4_OSXMMEEXCPT;
    23322337    return fMask;
    23332338}
  • TabularUnified trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp

    r91274 r91275  
    19741974            pFeatures->fPse36          |= RT_BOOL(pExtLeaf->uEdx & X86_CPUID_AMD_FEATURE_EDX_PSE36);
    19751975            pFeatures->fPae            |= RT_BOOL(pExtLeaf->uEdx & X86_CPUID_AMD_FEATURE_EDX_PAE);
     1976            pFeatures->fPge            |= RT_BOOL(pExtLeaf->uEdx & X86_CPUID_AMD_FEATURE_EDX_PGE);
    19761977            pFeatures->fPat            |= RT_BOOL(pExtLeaf->uEdx & X86_CPUID_AMD_FEATURE_EDX_PAT);
    19771978            pFeatures->fFxSaveRstor    |= RT_BOOL(pExtLeaf->uEdx & X86_CPUID_AMD_FEATURE_EDX_FXSR);
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