VirtualBox

Ignore:
Timestamp:
Feb 2, 2022 10:57:02 PM (3 years ago)
Author:
vboxsync
Message:

VMM: Changed PAGE_SIZE -> GUEST_PAGE_SIZE / HOST_PAGE_SIZE, PAGE_SHIFT -> GUEST_PAGE_SHIFT / HOST_PAGE_SHIFT, and PAGE_OFFSET_MASK -> GUEST_PAGE_OFFSET_MASK / HOST_PAGE_OFFSET_MASK. Also removed most usage of ASMMemIsZeroPage and ASMMemZeroPage since the host and guest page size doesn't need to be the same any more. Some work left to do in the page pool code. bugref:9898

File:
1 edited

Legend:

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

    r93115 r93554  
    350350        PPGMPAGE    pPage  = &pRam->aPages[0];
    351351        RTGCPHYS    GCPhys = pRam->GCPhys;
    352         uint32_t    cLeft  = pRam->cb >> PAGE_SHIFT;
     352        uint32_t    cLeft  = pRam->cb >> GUEST_PAGE_SHIFT;
    353353        while (cLeft-- > 0)
    354354        {
     
    377377                        int rc = pgmPhysGCPhys2CCPtrInternalReadOnly(pVM, pPage, GCPhys, &pvPage, &PgMpLck);
    378378                        if (    RT_SUCCESS(rc)
    379                             &&  ASMMemIsZeroPage(pvPage))
     379                            &&  ASMMemIsZero(pvPage, GUEST_PAGE_SIZE))
    380380                            cAllocZero++;
    381381                        else if (GMMR3IsDuplicatePage(pVM, PGM_PAGE_GET_PAGEID(pPage)))
     
    396396            /* next */
    397397            pPage++;
    398             GCPhys += PAGE_SIZE;
     398            GCPhys += GUEST_PAGE_SIZE;
    399399            cPages++;
    400400            /* Give some feedback for every processed megabyte. */
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