Changeset 108963 in vbox for trunk/include/VBox/vmm/gmm.h
- Timestamp:
- Apr 14, 2025 10:12:43 AM (7 days ago)
- svn:sync-xref-src-repo-rev:
- 168481
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/gmm.h
r106061 r108963 53 53 * @{ 54 54 */ 55 56 /** @def IN_GMM_R057 * Used to indicate whether we're inside the same link module as the ring 058 * part of the Global Memory Manager or not.59 */60 #ifdef DOXYGEN_RUNNING61 # define IN_GMM_R062 #endif63 /** @def GMMR0DECL64 * Ring 0 GMM export or import declaration.65 * @param type The return type of the function declaration.66 */67 #ifdef IN_GMM_R068 # define GMMR0DECL(type) DECLEXPORT(type) VBOXCALL69 #else70 # define GMMR0DECL(type) DECLIMPORT(type) VBOXCALL71 #endif72 73 /** @def IN_GMM_R374 * Used to indicate whether we're inside the same link module as the ring 375 * part of the Global Memory Manager or not.76 */77 #ifdef DOXYGEN_RUNNING78 # define IN_GMM_R379 #endif80 /** @def GMMR3DECL81 * Ring 3 GMM export or import declaration.82 * @param type The return type of the function declaration.83 */84 #ifdef IN_GMM_R385 # define GMMR3DECL(type) DECLEXPORT(type) VBOXCALL86 #else87 # define GMMR3DECL(type) DECLIMPORT(type) VBOXCALL88 #endif89 90 55 91 56 /** The chunk shift. (2^21 = 2 MB) */ … … 415 380 typedef const GMMSTATS *PCGMMSTATS; 416 381 417 418 GMMR0DECL(int) GMMR0Init(void);419 GMMR0DECL(void) GMMR0Term(void);420 GMMR0DECL(int) GMMR0InitPerVMData(PGVM pGVM);421 GMMR0DECL(void) GMMR0CleanupVM(PGVM pGVM); 422 GMMR0DECL(int) GMMR0InitialReservation(PGVM pGVM, VMCPUID idCpu, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages, 423 GMMOCPOLICY enmPolicy, GMMPRIORITY enmPriority); 424 GMMR0DECL(int) GMMR0UpdateReservation(PGVM pGVM, VMCPUID idCpu, uint64_t cBasePages,uint32_t cShadowPages, uint32_t cFixedPages);425 GMMR0DECL(int) GMMR0AllocateHandyPages(PGVM pGVM, VMCPUID idCpu, uint32_t cPagesToUpdate,426 uint32_t cPagesToAlloc, PGMMPAGEDESC paPages);427 GMMR0DECL(int) GMMR0AllocatePages(PGVM pGVM, VMCPUID idCpu, uint32_t cPages, PGMMPAGEDESC paPages, GMMACCOUNT enmAccount);428 GMMR0DECL(int) GMMR0AllocateLargePage(PGVM pGVM, VMCPUID idCpu, uint32_t cbPage, uint32_t *pIdPage, RTHCPHYS *pHCPhys);429 GMMR0DECL(int) GMMR0FreePages(PGVM pGVM, VMCPUID idCpu, uint32_t cPages, PGMMFREEPAGEDESC paPages, GMMACCOUNT enmAccount);430 GMMR0DECL(int) GMMR0FreeLargePage(PGVM pGVM, VMCPUID idCpu, uint32_t idPage);431 GMMR0DECL(int) GMMR0BalloonedPages(PGVM pGVM, VMCPUID idCpu, GMMBALLOONACTION enmAction, uint32_t cBalloonedPages);432 GMMR0DECL(int) GMMR0MapUnmapChunk(PGVM pGVM, uint32_t idChunkMap, uint32_t idChunkUnmap, PRTR3PTR ppvR3);433 GMMR0DECL(int) GMMR0PageIdToVirt(PGVM pGVM, uint32_t idPage, void **ppv);434 GMMR0DECL(int) GMMR0RegisterSharedModule(PGVM pGVM, VMCPUID idCpu, VBOXOSFAMILY enmGuestOS, char *pszModuleName,435 char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule, uint32_t cRegions,436 struct VMMDEVSHAREDREGIONDESC const *paRegions);437 GMMR0DECL(int) GMMR0UnregisterSharedModule(PGVM pGVM, VMCPUID idCpu, char *pszModuleName, char *pszVersion,438 RTGCPTR GCBaseAddr, uint32_t cbModule);439 GMMR0DECL(int) GMMR0UnregisterAllSharedModules(PGVM pGVM, VMCPUID idCpu);440 GMMR0DECL(int) GMMR0CheckSharedModules(PGVM pGVM, VMCPUID idCpu);441 GMMR0DECL(int) GMMR0ResetSharedModules(PGVM pGVM, VMCPUID idCpu);442 GMMR0DECL(int) GMMR0QueryStatistics(PGMMSTATS pStats, PSUPDRVSESSION pSession);443 GMMR0DECL(int) GMMR0ResetStatistics(PCGMMSTATS pStats, PSUPDRVSESSION pSession);382 VMMR0_INT_DECL(int) GMMR0Init(void); 383 VMMR0_INT_DECL(void) GMMR0Term(void); 384 VMMR0_INT_DECL(int) GMMR0InitPerVMData(PGVM pGVM); 385 VMMR0_INT_DECL(void) GMMR0CleanupVM(PGVM pGVM); 386 VMMR0_INT_DECL(int) GMMR0InitialReservation(PGVM pGVM, VMCPUID idCpu, uint64_t cBasePages, uint32_t cShadowPages, 387 uint32_t cFixedPages, GMMOCPOLICY enmPolicy, GMMPRIORITY enmPriority); 388 VMMR0_INT_DECL(int) GMMR0UpdateReservation(PGVM pGVM, VMCPUID idCpu, uint64_t cBasePages, 389 uint32_t cShadowPages, uint32_t cFixedPages); 390 VMMR0_INT_DECL(int) GMMR0AllocateHandyPages(PGVM pGVM, VMCPUID idCpu, uint32_t cPagesToUpdate, 391 uint32_t cPagesToAlloc, PGMMPAGEDESC paPages); 392 VMMR0_INT_DECL(int) GMMR0AllocatePages(PGVM pGVM, VMCPUID idCpu, uint32_t cPages, PGMMPAGEDESC paPages, GMMACCOUNT enmAccount); 393 VMMR0_INT_DECL(int) GMMR0AllocateLargePage(PGVM pGVM, VMCPUID idCpu, uint32_t cbPage, uint32_t *pIdPage, RTHCPHYS *pHCPhys); 394 VMMR0_INT_DECL(int) GMMR0FreePages(PGVM pGVM, VMCPUID idCpu, uint32_t cPages, PGMMFREEPAGEDESC paPages, GMMACCOUNT enmAccount); 395 VMMR0_INT_DECL(int) GMMR0FreeLargePage(PGVM pGVM, VMCPUID idCpu, uint32_t idPage); 396 VMMR0_INT_DECL(int) GMMR0BalloonedPages(PGVM pGVM, VMCPUID idCpu, GMMBALLOONACTION enmAction, uint32_t cBalloonedPages); 397 VMMR0_INT_DECL(int) GMMR0MapUnmapChunk(PGVM pGVM, uint32_t idChunkMap, uint32_t idChunkUnmap, PRTR3PTR ppvR3); 398 VMMR0_INT_DECL(int) GMMR0PageIdToVirt(PGVM pGVM, uint32_t idPage, void **ppv); 399 VMMR0_INT_DECL(int) GMMR0RegisterSharedModule(PGVM pGVM, VMCPUID idCpu, VBOXOSFAMILY enmGuestOS, char *pszModuleName, 400 char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule, uint32_t cRegions, 401 struct VMMDEVSHAREDREGIONDESC const *paRegions); 402 VMMR0_INT_DECL(int) GMMR0UnregisterSharedModule(PGVM pGVM, VMCPUID idCpu, char *pszModuleName, char *pszVersion, 403 RTGCPTR GCBaseAddr, uint32_t cbModule); 404 VMMR0_INT_DECL(int) GMMR0UnregisterAllSharedModules(PGVM pGVM, VMCPUID idCpu); 405 VMMR0_INT_DECL(int) GMMR0CheckSharedModules(PGVM pGVM, VMCPUID idCpu); 406 VMMR0_INT_DECL(int) GMMR0ResetSharedModules(PGVM pGVM, VMCPUID idCpu); 407 VMMR0_INT_DECL(int) GMMR0QueryStatistics(PGMMSTATS pStats, PSUPDRVSESSION pSession); 408 VMMR0_INT_DECL(int) GMMR0ResetStatistics(PCGMMSTATS pStats, PSUPDRVSESSION pSession); 444 409 445 410 /** … … 460 425 typedef GMMINITIALRESERVATIONREQ *PGMMINITIALRESERVATIONREQ; 461 426 462 GMMR0DECL(int) GMMR0InitialReservationReq(PGVM pGVM, VMCPUID idCpu, PGMMINITIALRESERVATIONREQ pReq);427 VMMR0_INT_DECL(int) GMMR0InitialReservationReq(PGVM pGVM, VMCPUID idCpu, PGMMINITIALRESERVATIONREQ pReq); 463 428 464 429 … … 478 443 typedef GMMUPDATERESERVATIONREQ *PGMMUPDATERESERVATIONREQ; 479 444 480 GMMR0DECL(int) GMMR0UpdateReservationReq(PGVM pGVM, VMCPUID idCpu, PGMMUPDATERESERVATIONREQ pReq);445 VMMR0_INT_DECL(int) GMMR0UpdateReservationReq(PGVM pGVM, VMCPUID idCpu, PGMMUPDATERESERVATIONREQ pReq); 481 446 482 447 … … 499 464 typedef GMMALLOCATEPAGESREQ *PGMMALLOCATEPAGESREQ; 500 465 501 GMMR0DECL(int) GMMR0AllocatePagesReq(PGVM pGVM, VMCPUID idCpu, PGMMALLOCATEPAGESREQ pReq);466 VMMR0_INT_DECL(int) GMMR0AllocatePagesReq(PGVM pGVM, VMCPUID idCpu, PGMMALLOCATEPAGESREQ pReq); 502 467 503 468 … … 520 485 typedef GMMFREEPAGESREQ *PGMMFREEPAGESREQ; 521 486 522 GMMR0DECL(int) GMMR0FreePagesReq(PGVM pGVM, VMCPUID idCpu, PGMMFREEPAGESREQ pReq);487 VMMR0_INT_DECL(int) GMMR0FreePagesReq(PGVM pGVM, VMCPUID idCpu, PGMMFREEPAGESREQ pReq); 523 488 524 489 /** … … 538 503 typedef GMMBALLOONEDPAGESREQ *PGMMBALLOONEDPAGESREQ; 539 504 540 GMMR0DECL(int) GMMR0BalloonedPagesReq(PGVM pGVM, VMCPUID idCpu, PGMMBALLOONEDPAGESREQ pReq);505 VMMR0_INT_DECL(int) GMMR0BalloonedPagesReq(PGVM pGVM, VMCPUID idCpu, PGMMBALLOONEDPAGESREQ pReq); 541 506 542 507 … … 563 528 typedef GMMMEMSTATSREQ *PGMMMEMSTATSREQ; 564 529 565 GMMR0DECL(int) GMMR0QueryHypervisorMemoryStatsReq(PGMMMEMSTATSREQ pReq);566 GMMR0DECL(int) GMMR0QueryMemoryStatsReq(PGVM pGVM, VMCPUID idCpu, PGMMMEMSTATSREQ pReq);530 VMMR0_INT_DECL(int) GMMR0QueryHypervisorMemoryStatsReq(PGMMMEMSTATSREQ pReq); 531 VMMR0_INT_DECL(int) GMMR0QueryMemoryStatsReq(PGVM pGVM, VMCPUID idCpu, PGMMMEMSTATSREQ pReq); 567 532 568 533 /** … … 584 549 typedef GMMMAPUNMAPCHUNKREQ *PGMMMAPUNMAPCHUNKREQ; 585 550 586 GMMR0DECL(int) GMMR0MapUnmapChunkReq(PGVM pGVM, PGMMMAPUNMAPCHUNKREQ pReq);551 VMMR0_INT_DECL(int) GMMR0MapUnmapChunkReq(PGVM pGVM, PGMMMAPUNMAPCHUNKREQ pReq); 587 552 588 553 … … 601 566 typedef GMMFREELARGEPAGEREQ *PGMMFREELARGEPAGEREQ; 602 567 603 GMMR0DECL(int) GMMR0FreeLargePageReq(PGVM pGVM, VMCPUID idCpu, PGMMFREELARGEPAGEREQ pReq);568 VMMR0_INT_DECL(int) GMMR0FreeLargePageReq(PGVM pGVM, VMCPUID idCpu, PGMMFREELARGEPAGEREQ pReq); 604 569 605 570 /** Maximum length of the shared module name string, terminator included. */ … … 636 601 typedef GMMREGISTERSHAREDMODULEREQ *PGMMREGISTERSHAREDMODULEREQ; 637 602 638 GMMR0DECL(int) GMMR0RegisterSharedModuleReq(PGVM pGVM, VMCPUID idCpu, PGMMREGISTERSHAREDMODULEREQ pReq);603 VMMR0_INT_DECL(int) GMMR0RegisterSharedModuleReq(PGVM pGVM, VMCPUID idCpu, PGMMREGISTERSHAREDMODULEREQ pReq); 639 604 640 605 /** … … 698 663 typedef GMMSHAREDPAGEDESC *PGMMSHAREDPAGEDESC; 699 664 700 GMMR0DECL(int) GMMR0SharedModuleCheckPage(PGVM pGVM, PGMMSHAREDMODULE pModule, uint32_t idxRegion, uint32_t idxPage,701 PGMMSHAREDPAGEDESC pPageDesc);665 VMMR0_INT_DECL(int) GMMR0SharedModuleCheckPage(PGVM pGVM, PGMMSHAREDMODULE pModule, uint32_t idxRegion, uint32_t idxPage, 666 PGMMSHAREDPAGEDESC pPageDesc); 702 667 703 668 /** … … 723 688 typedef GMMUNREGISTERSHAREDMODULEREQ *PGMMUNREGISTERSHAREDMODULEREQ; 724 689 725 GMMR0DECL(int) GMMR0UnregisterSharedModuleReq(PGVM pGVM, VMCPUID idCpu, PGMMUNREGISTERSHAREDMODULEREQ pReq);690 VMMR0_INT_DECL(int) GMMR0UnregisterSharedModuleReq(PGVM pGVM, VMCPUID idCpu, PGMMUNREGISTERSHAREDMODULEREQ pReq); 726 691 727 692 #if defined(VBOX_STRICT) && HC_ARCH_BITS == 64 … … 742 707 typedef GMMFINDDUPLICATEPAGEREQ *PGMMFINDDUPLICATEPAGEREQ; 743 708 744 GMMR0DECL(int) GMMR0FindDuplicatePageReq(PGVM pGVM, PGMMFINDDUPLICATEPAGEREQ pReq);709 VMMR0_INT_DECL(int) GMMR0FindDuplicatePageReq(PGVM pGVM, PGMMFINDDUPLICATEPAGEREQ pReq); 745 710 #endif /* VBOX_STRICT && HC_ARCH_BITS == 64 */ 746 711 … … 763 728 typedef GMMQUERYSTATISTICSSREQ *PGMMQUERYSTATISTICSSREQ; 764 729 765 GMMR0DECL(int) GMMR0QueryStatisticsReq(PGVM pGVM, PGMMQUERYSTATISTICSSREQ pReq);730 VMMR0_INT_DECL(int) GMMR0QueryStatisticsReq(PGVM pGVM, PGMMQUERYSTATISTICSSREQ pReq); 766 731 767 732 … … 784 749 typedef GMMRESETSTATISTICSSREQ *PGMMRESETSTATISTICSSREQ; 785 750 786 GMMR0DECL(int) GMMR0ResetStatisticsReq(PGVM pGVM, PGMMRESETSTATISTICSSREQ pReq);751 VMMR0_INT_DECL(int) GMMR0ResetStatisticsReq(PGVM pGVM, PGMMRESETSTATISTICSSREQ pReq); 787 752 788 753 … … 792 757 * @{ 793 758 */ 794 GMMR3DECL(int) GMMR3InitialReservation(PVM pVM, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages, 795 GMMOCPOLICY enmPolicy, GMMPRIORITY enmPriority); 796 GMMR3DECL(int) GMMR3UpdateReservation(PVM pVM, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages); 797 GMMR3DECL(int) GMMR3AllocatePagesPrepare(PVM pVM, PGMMALLOCATEPAGESREQ *ppReq, uint32_t cPages, GMMACCOUNT enmAccount); 798 GMMR3DECL(int) GMMR3AllocatePagesPerform(PVM pVM, PGMMALLOCATEPAGESREQ pReq); 799 GMMR3DECL(void) GMMR3AllocatePagesCleanup(PGMMALLOCATEPAGESREQ pReq); 800 GMMR3DECL(int) GMMR3FreePagesPrepare(PVM pVM, PGMMFREEPAGESREQ *ppReq, uint32_t cPages, GMMACCOUNT enmAccount); 801 GMMR3DECL(void) GMMR3FreePagesRePrep(PVM pVM, PGMMFREEPAGESREQ pReq, uint32_t cPages, GMMACCOUNT enmAccount); 802 GMMR3DECL(int) GMMR3FreePagesPerform(PVM pVM, PGMMFREEPAGESREQ pReq, uint32_t cActualPages); 803 GMMR3DECL(void) GMMR3FreePagesCleanup(PGMMFREEPAGESREQ pReq); 804 GMMR3DECL(void) GMMR3FreeAllocatedPages(PVM pVM, GMMALLOCATEPAGESREQ const *pAllocReq); 805 GMMR3DECL(int) GMMR3AllocateLargePage(PVM pVM, uint32_t cbPage); 806 GMMR3DECL(int) GMMR3FreeLargePage(PVM pVM, uint32_t idPage); 807 GMMR3DECL(int) GMMR3MapUnmapChunk(PVM pVM, uint32_t idChunkMap, uint32_t idChunkUnmap, PRTR3PTR ppvR3); 808 GMMR3DECL(int) GMMR3QueryHypervisorMemoryStats(PVM pVM, uint64_t *pcTotalAllocPages, uint64_t *pcTotalFreePages, uint64_t *pcTotalBalloonPages, uint64_t *puTotalBalloonSize); 809 GMMR3DECL(int) GMMR3QueryMemoryStats(PVM pVM, uint64_t *pcAllocPages, uint64_t *pcMaxPages, uint64_t *pcBalloonPages); 810 GMMR3DECL(int) GMMR3BalloonedPages(PVM pVM, GMMBALLOONACTION enmAction, uint32_t cBalloonedPages); 811 GMMR3DECL(int) GMMR3RegisterSharedModule(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pReq); 812 GMMR3DECL(int) GMMR3UnregisterSharedModule(PVM pVM, PGMMUNREGISTERSHAREDMODULEREQ pReq); 813 GMMR3DECL(int) GMMR3CheckSharedModules(PVM pVM); 814 GMMR3DECL(int) GMMR3ResetSharedModules(PVM pVM); 759 VMMR3_INT_DECL(int) GMMR3InitialReservation(PVM pVM, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages, 760 GMMOCPOLICY enmPolicy, GMMPRIORITY enmPriority); 761 VMMR3_INT_DECL(int) GMMR3UpdateReservation(PVM pVM, uint64_t cBasePages, uint32_t cShadowPages, uint32_t cFixedPages); 762 VMMR3_INT_DECL(int) GMMR3AllocatePagesPrepare(PVM pVM, PGMMALLOCATEPAGESREQ *ppReq, uint32_t cPages, GMMACCOUNT enmAccount); 763 VMMR3_INT_DECL(int) GMMR3AllocatePagesPerform(PVM pVM, PGMMALLOCATEPAGESREQ pReq); 764 VMMR3_INT_DECL(void) GMMR3AllocatePagesCleanup(PGMMALLOCATEPAGESREQ pReq); 765 VMMR3_INT_DECL(int) GMMR3FreePagesPrepare(PVM pVM, PGMMFREEPAGESREQ *ppReq, uint32_t cPages, GMMACCOUNT enmAccount); 766 VMMR3_INT_DECL(void) GMMR3FreePagesRePrep(PVM pVM, PGMMFREEPAGESREQ pReq, uint32_t cPages, GMMACCOUNT enmAccount); 767 VMMR3_INT_DECL(int) GMMR3FreePagesPerform(PVM pVM, PGMMFREEPAGESREQ pReq, uint32_t cActualPages); 768 VMMR3_INT_DECL(void) GMMR3FreePagesCleanup(PGMMFREEPAGESREQ pReq); 769 VMMR3_INT_DECL(void) GMMR3FreeAllocatedPages(PVM pVM, GMMALLOCATEPAGESREQ const *pAllocReq); 770 VMMR3_INT_DECL(int) GMMR3AllocateLargePage(PVM pVM, uint32_t cbPage); 771 VMMR3_INT_DECL(int) GMMR3FreeLargePage(PVM pVM, uint32_t idPage); 772 VMMR3_INT_DECL(int) GMMR3MapUnmapChunk(PVM pVM, uint32_t idChunkMap, uint32_t idChunkUnmap, PRTR3PTR ppvR3); 773 VMMR3_INT_DECL(int) GMMR3QueryHypervisorMemoryStats(PVM pVM, uint64_t *pcTotalAllocPages, uint64_t *pcTotalFreePages, 774 uint64_t *pcTotalBalloonPages, uint64_t *puTotalBalloonSize); 775 VMMR3_INT_DECL(int) GMMR3QueryMemoryStats(PVM pVM, uint64_t *pcAllocPages, uint64_t *pcMaxPages, uint64_t *pcBalloonPages); 776 VMMR3_INT_DECL(int) GMMR3BalloonedPages(PVM pVM, GMMBALLOONACTION enmAction, uint32_t cBalloonedPages); 777 VMMR3_INT_DECL(int) GMMR3RegisterSharedModule(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pReq); 778 VMMR3_INT_DECL(int) GMMR3UnregisterSharedModule(PVM pVM, PGMMUNREGISTERSHAREDMODULEREQ pReq); 779 VMMR3_INT_DECL(int) GMMR3CheckSharedModules(PVM pVM); 780 VMMR3_INT_DECL(int) GMMR3ResetSharedModules(PVM pVM); 815 781 816 782 # if defined(VBOX_STRICT) && HC_ARCH_BITS == 64 817 GMMR3DECL(bool) GMMR3IsDuplicatePage(PVM pVM, uint32_t idPage);783 VMMR3_INT_DECL(bool) GMMR3IsDuplicatePage(PVM pVM, uint32_t idPage); 818 784 # endif 819 785
Note:
See TracChangeset
for help on using the changeset viewer.