VirtualBox

Ignore:
Timestamp:
Jul 28, 2015 11:49:23 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101836
Message:

supdrv: Added SUPKERNELFEATURES_SMAP to SUPR0GetKernelFeatures and document the API in the header.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp

    r56702 r57108  
    14001400}
    14011401
     1402
    14021403/**
    14031404 * Check if the CPU has SMAP support.
     
    14171418}
    14181419
     1420
    14191421RTDECL(int) SUPR0Printf(const char *pszFormat, ...)
    14201422{
     
    14321434
    14331435
    1434 /**
    1435  * Returns configuration flags of the host kernel.
    1436  */
    14371436SUPR0DECL(uint32_t) SUPR0GetKernelFeatures(void)
    14381437{
    1439     return 0;
     1438    uint32_t fFlags = 0;
     1439    if (ASMGetCR4() & X86_CR4_SMAP)
     1440        fFlags |= SUPKERNELFEATURES_SMAP;
     1441    return fFlags;
    14401442}
    14411443
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