VirtualBox

Changeset 108134 in vbox


Ignore:
Timestamp:
Feb 10, 2025 11:43:35 AM (2 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167435
Message:

VMM/PGM: Merge and deduplicate code targeting x86 & amd64 in PGM.cpp. Don't bother compiling pool stuff on arm and darwin.amd64. jiraref:VBP-1531

Location:
trunk/src/VBox/VMM
Files:
1 deleted
4 edited

Legend:

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

    r108132 r108134  
    6565#ifdef VBOX_VMM_TARGET_X86
    6666DECLINLINE(int) pgmShwGetLongModePDPtr(PVMCPUCC pVCpu, RTGCPTR64 GCPtr, PX86PML4E *ppPml4e, PX86PDPT *ppPdpt, PX86PDPAE *ppPD);
     67# ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    6768DECLINLINE(int) pgmShwGetPaePoolPagePD(PVMCPUCC pVCpu, RTGCPTR GCPtr, PPGMPOOLPAGE *ppShwPde);
     69# endif
    6870DECLINLINE(int) pgmGstMapCr3(PVMCPUCC pVCpu, RTGCPHYS GCPhysCr3, PRTHCPTR pHCPtrGuestCr3);
    6971# ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT
     
    40484050        }
    40494051
     4052# ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    40504053        if (IS_PART_INCLUDED(6))
    40514054        {
     
    40554058            cch += RTStrFormatNumber(&szTmp[cch], PGM_PAGE_GET_TD_IDX_NA(pPage), 16, 4, 0, RTSTR_F_ZEROPAD | RTSTR_F_16BIT);
    40564059        }
     4060# endif
    40574061# undef IS_PART_INCLUDED
    40584062
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r107171 r108134  
    42174217    return 0;
    42184218#else
    4219     unsigned cErrors = 0;
    4220     PVMCC    pVM     = pVCpu->CTX_SUFF(pVM);
    4221     PPGMPOOL pPool   = pVM->pgm.s.CTX_SUFF(pPool); NOREF(pPool);
     4219    unsigned       cErrors = 0;
     4220    PVMCC const    pVM     = pVCpu->CTX_SUFF(pVM); RT_NOREF(pVM);
     4221# ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
     4222    PPGMPOOL const pPool   = pVM->pgm.s.CTX_SUFF(pPool); NOREF(pPool);
     4223# endif
    42224224
    42234225# if PGM_GST_TYPE == PGM_TYPE_PAE
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r108132 r108134  
    19091909/** @} */
    19101910
     1911
     1912#ifndef VBOX_WITH_ONLY_PGM_NEM_MODE /* No pool in NEM-only mode! */
    19111913
    19121914/** @name PGM Pool Indexes.
     
    25092511/** @} */
    25102512
     2513#endif /* !VBOX_WITH_ONLY_PGM_NEM_MODE - No pool in NEM-only mode! */
     2514
    25112515
    25122516
     
    31473151    /** RAM range TLB for R3. */
    31483152    R3PTRTYPE(PPGMRAMRANGE)         apRamRangesTlb[PGM_RAMRANGE_TLB_ENTRIES];
     3153#ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    31493154    /** Shadow Page Pool - R3 Ptr. */
    31503155    R3PTRTYPE(PPGMPOOL)             pPoolR3;
    3151 
     3156#else
     3157    RTR3PTR                         ReservedPoolR3;
     3158#endif
     3159
     3160#ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    31523161    /** Shadow Page Pool - R0 Ptr. */
    31533162    R0PTRTYPE(PPGMPOOL)             pPoolR0;
     3163#else
     3164    RTR0PTR                         ReservedPoolR0;
     3165#endif
    31543166
    31553167    /** Hack: Number of deprecated page mapping locks taken by the current lock
     
    38593871    /** @} */
    38603872
     3873# ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    38613874    /** @name PGM Pool related stuff.
    38623875     * @{ */
     
    38683881    RTR0MEMOBJ                      ahPoolMapObjs[(PGMPOOL_IDX_LAST + PGMPOOL_CFG_MAX_GROW - 1) / PGMPOOL_CFG_MAX_GROW];
    38693882    /** @} */
     3883# endif
    38703884
    38713885    /** Physical access handler types for ring-0.
  • trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp

    r107650 r108134  
    322322    CHECK_MEMBER_ALIGNMENT(PGMCPU, Dis, 8);
    323323    CHECK_MEMBER_ALIGNMENT(PGMCPU, cPoolAccessHandler, 8);
     324#ifndef VBOX_WITH_ONLY_PGM_NEM_MODE
    324325    CHECK_MEMBER_ALIGNMENT(PGMPOOLPAGE, idx, sizeof(uint16_t));
    325326    CHECK_MEMBER_ALIGNMENT(PGMPOOLPAGE, pvPageR3, sizeof(RTHCPTR));
    326327    CHECK_MEMBER_ALIGNMENT(PGMPOOLPAGE, GCPhys, sizeof(RTGCPHYS));
     328#endif
    327329    CHECK_SIZE(PGMPAGE, 16);
    328330    CHECK_MEMBER_ALIGNMENT(PGMRAMRANGE, aPages, 16);
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