VirtualBox

Changeset 92556 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Nov 23, 2021 1:12:29 AM (3 years ago)
Author:
vboxsync
Message:

SUP,VMM: Added a fFlags parameter to SUPR3PageAlloc so we can indicate a desire for large pages and other things. HM must enable large pages when configred for the NEM code paths too. bugref:9044 bugref:5324

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r91693 r92556  
    612612                if (   RT_SUCCESS(rc2)
    613613                    && pVM->bMainExecutionEngine != VM_EXEC_ENGINE_NOT_SET)
     614                {
    614615                    rc = VINF_SUCCESS;
     616
     617                    /* For some reason, HM is in charge or large pages. Make sure to enable them: */
     618                    PGMSetLargePageUsage(pVM, pVM->hm.s.fLargePages);
     619                }
    615620            }
    616621            if (RT_FAILURE(rc))
     
    629634            if (RT_FAILURE(rc))
    630635                return rc;
     636
     637            /* For some reason, HM is in charge or large pages. Make sure to enable them: */
     638            PGMSetLargePageUsage(pVM, pVM->hm.s.fLargePages);
    631639        }
    632640        if (   pVM->bMainExecutionEngine == VM_EXEC_ENGINE_NOT_SET
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r92518 r92556  
    16261626    else
    16271627    {
    1628         int rc = SUPR3PageAlloc(cPages, &pNew->pvR3);
     1628        int rc = SUPR3PageAlloc(cPages, pVM->pgm.s.fUseLargePages ? SUP_PAGE_ALLOC_F_LARGE_PAGES : 0, &pNew->pvR3);
    16291629        if (RT_FAILURE(rc))
    16301630            return rc;
     
    30753075            else
    30763076            {
    3077                 rc = SUPR3PageAlloc(cPages, &pvPages);
     3077                rc = SUPR3PageAlloc(cPages, pVM->pgm.s.fUseLargePages ? SUP_PAGE_ALLOC_F_LARGE_PAGES : 0, &pvPages);
    30783078                if (RT_SUCCESS(rc))
    30793079                    for (uint32_t i = 0; i < cPages; i++)
     
    43724372        if (!fRamExists)
    43734373        {
    4374             int rc = SUPR3PageAlloc(cPages, &pvRam);
     4374            int rc = SUPR3PageAlloc(cPages, 0, &pvRam);
    43754375            if (RT_FAILURE(rc))
    43764376                return rc;
     
    43784378        if (fFlags & PGMPHYS_ROM_FLAGS_SHADOWED)
    43794379        {
    4380             int rc = SUPR3PageAlloc(cPages, &pvAlt);
     4380            int rc = SUPR3PageAlloc(cPages, 0, &pvAlt);
    43814381            if (RT_FAILURE(rc))
    43824382            {
  • trunk/src/VBox/VMM/testcase/tstCFGM.cpp

    r86361 r92556  
    103103
    104104    PVM pVM;
    105     RTTESTI_CHECK_RC_RETV(SUPR3PageAlloc(RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT, (void **)&pVM), VINF_SUCCESS);
     105    RTTESTI_CHECK_RC_RETV(SUPR3PageAlloc(RT_ALIGN_Z(sizeof(*pVM), PAGE_SIZE) >> PAGE_SHIFT, 0, (void **)&pVM), VINF_SUCCESS);
    106106
    107107
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