VirtualBox

Changeset 108676 in vbox for trunk/src


Ignore:
Timestamp:
Mar 20, 2025 9:29:19 PM (8 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168089
Message:

VMM/PGM: Don't need the abZeroPg and abMmioPg page sized members if only NEM PGM mode is available, bugref:10391

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

Legend:

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

    r108132 r108676  
    5252#ifdef IN_RING3
    5353# include <iprt/thread.h>
     54# ifdef VBOX_WITH_ONLY_PGM_NEM_MODE
     55#  include <iprt/zero.h>
     56# endif
    5457#elif defined(IN_RING0)
    5558# include <iprt/mem.h>
     
    30033006#ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    30043007        AssertMsg(PGM_PAGE_GET_HCPHYS(pPage) == pVM->pgm.s.HCPhysZeroPg, ("%RGp/%R[pgmpage]\n", GCPhys, pPage));
    3005 #endif
    30063008#ifndef IN_RING0
    30073009        pTlbe->pMap = NULL;
    30083010#endif
    30093011        pTlbe->pv = pVM->pgm.s.abZeroPg;
     3012#else
     3013        /*
     3014         * Should not ever be used, as we don't implement zero pages for NEM mode currently and
     3015         * MMIO accesses are not handled through the TLB.
     3016         */
     3017        pTlbe->pv = (void *)&g_abRTZero64K[0]; /* Maximum granule size on ARM. */
     3018#endif
    30103019    }
    30113020#ifdef PGM_WITH_PHYS_TLB
  • TabularUnified trunk/src/VBox/VMM/VMMR3/PGM.cpp

    r108132 r108676  
    981981    AssertRCReturn(rc, rc);
    982982
     983#ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    983984    /*
    984985     * Setup the zero page (HCPHysZeroPg is set by ring-0).
    985986     */
    986987    RT_ZERO(pVM->pgm.s.abZeroPg); /* paranoia */
    987 #ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    988988    if (fDriverless)
    989989        pVM->pgm.s.HCPhysZeroPg = _4G - GUEST_PAGE_SIZE * 2 /* fake to avoid PGM_PAGE_INIT_ZERO assertion */;
     
    991991    AssertRelease(pVM->pgm.s.HCPhysZeroPg != 0);
    992992    Log(("HCPhysZeroPg=%RHp abZeroPg=%p\n", pVM->pgm.s.HCPhysZeroPg, pVM->pgm.s.abZeroPg));
    993 #endif
    994993
    995994    /*
     
    998997     */
    999998    ASMMemFill32(pVM->pgm.s.abMmioPg, sizeof(pVM->pgm.s.abMmioPg), 0xfeedface);
    1000 #ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    1001999    if (fDriverless)
    10021000        pVM->pgm.s.HCPhysMmioPg = _4G - GUEST_PAGE_SIZE * 3 /* fake to avoid PGM_PAGE_INIT_ZERO assertion */;
  • TabularUnified trunk/src/VBox/VMM/include/PGMInternal.h

    r108134 r108676  
    30153015typedef struct PGM
    30163016{
     3017#ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    30173018    /** The zero page. */
    30183019    uint8_t                         abZeroPg[RT_MAX(HOST_PAGE_SIZE, GUEST_PAGE_SIZE)];
    30193020    /** The MMIO placeholder page. */
    30203021    uint8_t                         abMmioPg[RT_MAX(HOST_PAGE_SIZE, GUEST_PAGE_SIZE)];
     3022#endif
    30213023
    30223024    /** @name   RAM, MMIO2 and ROM ranges
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