VirtualBox

Changeset 82555 in vbox for trunk/include


Ignore:
Timestamp:
Dec 11, 2019 11:56:54 PM (5 years ago)
Author:
vboxsync
Message:

PGMPool,MM: Use ring-0 mapping while in ring-0, so let the page pool do its own allocations rather than going through MMPage*. The MMPage* code is mostly code, but we still need it for a dummy page allocation. I'll address this tomorrow. bugref:9528

Location:
trunk/include/VBox/vmm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/gvm.h

    r82031 r82555  
    207207    union
    208208    {
     209#if defined(VMM_INCLUDED_SRC_include_PGMInternal_h) && defined(IN_RING0)
     210        struct PGMR0PERVM   s;
     211#endif
     212        uint8_t             padding[640];
     213    } pgmr0;
     214
     215    union
     216    {
    209217#if defined(VMM_INCLUDED_SRC_include_IOMInternal_h) && defined(IN_RING0)
    210218        struct IOMR0PERVM   s;
     
    223231    /** Padding so aCpus starts on a page boundrary.  */
    224232#ifdef VBOX_WITH_NEM_R0
    225     uint8_t         abPadding2[4096 - 64 - 256 - 512 - 256 - 64 - 1792 - 512 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
    226 #else
    227     uint8_t         abPadding2[4096 - 64 - 256 - 512       - 64 - 1792 - 512 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
     233    uint8_t         abPadding2[4096*2 - 64 - 256 - 512 - 256 - 64 - 1792 - 640 - 512 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
     234#else
     235    uint8_t         abPadding2[4096*2 - 64 - 256 - 512       - 64 - 1792 - 640 - 512 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
    228236#endif
    229237
  • trunk/include/VBox/vmm/mm.h

    r82316 r82555  
    213213VMMDECL(bool)       MMHyperIsInsideArea(PVM pVM, RTGCPTR GCPtr);
    214214
    215 
     215#if 0
    216216VMMDECL(RTHCPHYS)   MMPage2Phys(PVM pVM, void *pvPage);
    217217VMMDECL(void *)     MMPagePhys2Page(PVM pVM, RTHCPHYS HCPhysPage);
    218218VMMDECL(int)        MMPagePhys2PageEx(PVM pVM, RTHCPHYS HCPhysPage, void **ppvPage);
    219219VMMDECL(int)        MMPagePhys2PageTry(PVM pVM, RTHCPHYS HCPhysPage, void **ppvPage);
     220#endif
    220221
    221222
     
    289290/** @defgroup grp_mm_page   Physical Page Pool
    290291 * @{ */
     292#if 0
    291293VMMR3DECL(void *)   MMR3PageAlloc(PVM pVM);
    292294VMMR3DECL(RTHCPHYS) MMR3PageAllocPhys(PVM pVM);
     
    295297VMMR3DECL(void)     MMR3PageFreeLow(PVM pVM, void *pvPage);
    296298VMMR3DECL(void)     MMR3PageFreeByPhys(PVM pVM, RTHCPHYS HCPhysPage);
     299#endif
    297300VMMR3DECL(void *)   MMR3PageDummyHCPtr(PVM pVM);
    298301VMMR3DECL(RTHCPHYS) MMR3PageDummyHCPhys(PVM pVM);
  • trunk/include/VBox/vmm/pgm.h

    r82316 r82555  
    675675 * @{
    676676 */
    677 VMMR0_INT_DECL(int) PGMR0PhysAllocateHandyPages(PGVM pGVM, VMCPUID idCpu);
    678 VMMR0_INT_DECL(int) PGMR0PhysFlushHandyPages(PGVM pGVM, VMCPUID idCpu);
    679 VMMR0_INT_DECL(int) PGMR0PhysAllocateLargeHandyPage(PGVM pGVM, VMCPUID idCpu);
    680 VMMR0_INT_DECL(int) PGMR0PhysMMIO2MapKernel(PGVM pGVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2,
    681                                             size_t offSub, size_t cbSub, void **ppvMapping);
    682 VMMR0_INT_DECL(int) PGMR0PhysSetupIoMmu(PGVM pGVM);
    683 VMMR0DECL(int)      PGMR0SharedModuleCheck(PVMCC pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, PCRTGCPTR64 paRegionsGCPtrs);
    684 VMMR0DECL(int)      PGMR0Trap0eHandlerNestedPaging(PGVM pGVM, PGVMCPU pGVCpu, PGMMODE enmShwPagingMode, RTGCUINT uErr, PCPUMCTXCORE pRegFrame, RTGCPHYS pvFault);
    685 VMMR0DECL(VBOXSTRICTRC) PGMR0Trap0eHandlerNPMisconfig(PGVM pGVM, PGVMCPU pGVCpu, PGMMODE enmShwPagingMode, PCPUMCTXCORE pRegFrame, RTGCPHYS GCPhysFault, uint32_t uErr);
     677VMMR0_INT_DECL(int)  PGMR0InitPerVMData(PGVM pGVM);
     678VMMR0_INT_DECL(int)  PGMR0InitVM(PGVM pGVM);
     679VMMR0_INT_DECL(void) PGMR0CleanupVM(PGVM pGVM);
     680VMMR0_INT_DECL(int)  PGMR0PhysAllocateHandyPages(PGVM pGVM, VMCPUID idCpu);
     681VMMR0_INT_DECL(int)  PGMR0PhysFlushHandyPages(PGVM pGVM, VMCPUID idCpu);
     682VMMR0_INT_DECL(int)  PGMR0PhysAllocateLargeHandyPage(PGVM pGVM, VMCPUID idCpu);
     683VMMR0_INT_DECL(int)  PGMR0PhysMMIO2MapKernel(PGVM pGVM, PPDMDEVINS pDevIns, PGMMMIO2HANDLE hMmio2,
     684                                             size_t offSub, size_t cbSub, void **ppvMapping);
     685VMMR0_INT_DECL(int)  PGMR0PhysSetupIoMmu(PGVM pGVM);
     686VMMR0DECL(int)       PGMR0SharedModuleCheck(PVMCC pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule,
     687                                            PCRTGCPTR64 paRegionsGCPtrs);
     688VMMR0DECL(int)       PGMR0Trap0eHandlerNestedPaging(PGVM pGVM, PGVMCPU pGVCpu, PGMMODE enmShwPagingMode, RTGCUINT uErr,
     689                                                    PCPUMCTXCORE pRegFrame, RTGCPHYS pvFault);
     690VMMR0DECL(VBOXSTRICTRC) PGMR0Trap0eHandlerNPMisconfig(PGVM pGVM, PGVMCPU pGVCpu, PGMMODE enmShwPagingMode,
     691                                                      PCPUMCTXCORE pRegFrame, RTGCPHYS GCPhysFault, uint32_t uErr);
     692VMMR0_INT_DECL(int)  PGMR0PoolGrow(PGVM pGVM);
     693
    686694# ifdef VBOX_WITH_2X_4GB_ADDR_SPACE
    687 VMMR0DECL(int)      PGMR0DynMapInit(void);
    688 VMMR0DECL(void)     PGMR0DynMapTerm(void);
    689 VMMR0DECL(int)      PGMR0DynMapInitVM(PVMCC pVM);
    690 VMMR0DECL(void)     PGMR0DynMapTermVM(PVMCC pVM);
    691 VMMR0DECL(int)      PGMR0DynMapAssertIntegrity(void);
    692 VMMR0DECL(bool)     PGMR0DynMapStartOrMigrateAutoSet(PVMCPUCC pVCpu);
    693 VMMR0DECL(void)     PGMR0DynMapMigrateAutoSet(PVMCPUCC pVCpu);
     695VMMR0DECL(int)       PGMR0DynMapInit(void);
     696VMMR0DECL(void)      PGMR0DynMapTerm(void);
     697VMMR0DECL(int)       PGMR0DynMapInitVM(PVMCC pVM);
     698VMMR0DECL(void)      PGMR0DynMapTermVM(PVMCC pVM);
     699VMMR0DECL(int)       PGMR0DynMapAssertIntegrity(void);
     700VMMR0DECL(bool)      PGMR0DynMapStartOrMigrateAutoSet(PVMCPUCC pVCpu);
     701VMMR0DECL(void)      PGMR0DynMapMigrateAutoSet(PVMCPUCC pVCpu);
    694702# endif
    695703/** @} */
     
    787795                                                     const char *pszDesc,
    788796                                                     PPGMPHYSHANDLERTYPE phType);
    789 VMMR3DECL(int)      PGMR3PoolGrow(PVM pVM);
     797VMMR3_INT_DECL(int) PGMR3PoolGrow(PVM pVM, PVMCPU pVCpu);
    790798
    791799VMMR3DECL(int)      PGMR3PhysTlbGCPhys2Ptr(PVM pVM, RTGCPHYS GCPhys, bool fWritable, void **ppv);
  • trunk/include/VBox/vmm/vmm.h

    r82544 r82555  
    311311    /** Call PGMR0PhysSetupIommu(). */
    312312    VMMR0_DO_PGM_PHYS_SETUP_IOMMU,
     313    /** Call PGMR0PoolGrow(). */
     314    VMMR0_DO_PGM_POOL_GROW,
    313315
    314316    /** Call GMMR0InitialReservation(). */
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