Changeset 93650 in vbox for trunk/include
- Timestamp:
- Feb 8, 2022 10:43:53 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149804
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/gvm.h
r93609 r93650 255 255 struct PGMR0PERVM s; 256 256 #endif 257 uint8_t padding[ 640];257 uint8_t padding[1920]; 258 258 } pgmr0; 259 259 … … 300 300 /** Padding so aCpus starts on a page boundrary. */ 301 301 #ifdef VBOX_WITH_NEM_R0 302 uint8_t abPadding2[16384 - 64 - 4352 - 1024 - 256 - 256 - 64 - 3008 - 640 - 512 - 64 - 1024 - 128 - 704 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];302 uint8_t abPadding2[16384 - 64 - 4352 - 1024 - 256 - 256 - 64 - 3008 - 1920 - 512 - 64 - 1024 - 128 - 704 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT]; 303 303 #else 304 uint8_t abPadding2[16384 - 64 - 4352 - 1024 - 256 - 64 - 3008 - 640 - 512 - 64 - 1024 - 128 - 704 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];304 uint8_t abPadding2[16384 - 64 - 4352 - 1024 - 256 - 64 - 3008 - 1920 - 512 - 64 - 1024 - 128 - 704 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT]; 305 305 #endif 306 306 -
trunk/include/VBox/vmm/gvm.mac
r93609 r93650 85 85 .pdmr0 resb 3008 86 86 alignb 64 87 .pgmr0 resb 64087 .pgmr0 resb 1920 88 88 alignb 64 89 89 .iomr0 resb 512 -
trunk/include/VBox/vmm/iem.h
r93198 r93650 387 387 /** @} */ 388 388 389 /** @defgroup grp_iem_r3 The IEM Host Context Ring-3 API. 390 * @{ 391 */ 392 VMMR0_INT_DECL(int) IEMR0InitVM(PGVM pGVM); 393 /** @} */ 394 389 395 390 396 /** @defgroup grp_iem_r3 The IEM Host Context Ring-3 API. -
trunk/include/VBox/vmm/iom.h
r93115 r93650 514 514 * @{ */ 515 515 VMMR0_INT_DECL(void) IOMR0InitPerVMData(PGVM pGVM); 516 VMMR0_INT_DECL(int) IOMR0InitVM(PGVM pGVM); 516 517 VMMR0_INT_DECL(void) IOMR0CleanupVM(PGVM pGVM); 517 518 -
trunk/include/VBox/vmm/mm.h
r93628 r93650 177 177 #endif 178 178 VMMDECL(size_t) MMHyperHeapGetFreeSize(PVM pVM); 179 VMMDECL(void *) MMHyperHeapOffsetToPtr(PVM pVM, uint32_t offHeap);180 VMMDECL(uint32_t) MMHyperHeapPtrToOffset(PVM pVM, void *pv);181 179 VMMDECL(bool) MMHyperIsInsideArea(PVM pVM, RTGCPTR GCPtr); 182 180 -
trunk/include/VBox/vmm/pdmdev.h
r93635 r93650 4859 4859 * 4860 4860 * @returns VBox status code. 4861 * @param pDevIns The device instance. 4862 * @param enmKind The kind of access handler. 4863 * @param pfnHandlerR3 Pointer to the ring-3 handler callback. 4864 * @param pszHandlerR0 The name of the ring-0 handler, NULL if the ring-3 4865 * handler should be called. 4866 * @param pszPfHandlerR0 The name of the ring-0 \#PF handler, NULL if the 4867 * ring-3 handler should be called. 4868 * @param pszHandlerRC The name of the raw-mode context handler, NULL if 4869 * the ring-3 handler should be called. 4870 * @param pszPfHandlerRC The name of the raw-mode context \#PF handler, NULL 4871 * if the ring-3 handler should be called. 4872 * @param pszDesc The type description. 4873 * @param phType Where to return the type handle (cross context 4874 * safe). 4861 * @param pDevIns The device instance. 4862 * @param enmKind The kind of access handler. 4863 * @param pfnHandler Pointer to the ring-3 handler callback. 4864 * @param pszDesc The type description. 4865 * @param phType Where to return the type handle (cross context safe). 4866 * @sa PDMDevHlpPGMHandlerPhysicalTypeSetUpContext 4875 4867 */ 4876 4868 DECLR3CALLBACKMEMBER(int, pfnPGMHandlerPhysicalTypeRegister, (PPDMDEVINS pDevIns, PGMPHYSHANDLERKIND enmKind, 4877 R3PTRTYPE(PFNPGMPHYSHANDLER) pfnHandlerR3, 4878 const char *pszHandlerR0, const char *pszPfHandlerR0, 4879 const char *pszHandlerRC, const char *pszPfHandlerRC, 4869 PFNPGMPHYSHANDLER pfnHandler, 4880 4870 const char *pszDesc, PPGMPHYSHANDLERTYPE phType)); 4881 4871 … … 5964 5954 5965 5955 /** 5956 * Sets up a physical page access handler type for ring-0 callbacks. 5957 * 5958 * @returns VBox status code. 5959 * @param pDevIns The device instance. 5960 * @param enmKind The kind of access handler. 5961 * @param pfnHandler Pointer to the ring-0 handler callback. NULL if 5962 * the ring-3 handler should be called. 5963 * @param pfnPfHandler The name of the ring-0 \#PF handler, NULL if the 5964 * ring-3 handler should be called. 5965 * @param pszDesc The type description. 5966 * @param hType The type handle registered in ring-3 already. 5967 * @sa PDMDevHlpPGMHandlerPhysicalTypeRegister 5968 */ 5969 DECLR0CALLBACKMEMBER(int, pfnPGMHandlerPhysicalTypeSetUpContext, (PPDMDEVINS pDevIns, PGMPHYSHANDLERKIND enmKind, 5970 PFNPGMPHYSHANDLER pfnHandler, 5971 PFNPGMRZPHYSPFHANDLER pfnPfHandler, 5972 const char *pszDesc, PGMPHYSHANDLERTYPE hType)); 5973 5974 /** 5966 5975 * Temporarily turns off the access monitoring of a page within a monitored 5967 5976 * physical write/all page access handler region. … … 6059 6068 6060 6069 /** Current PDMDEVHLP version number. */ 6061 #define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 2 6, 0)6070 #define PDM_DEVHLPR0_VERSION PDM_VERSION_MAKE(0xffe5, 27, 0) 6062 6071 6063 6072 … … 9460 9469 */ 9461 9470 DECLINLINE(int) PDMDevHlpPGMHandlerPhysicalTypeRegister(PPDMDEVINS pDevIns, PGMPHYSHANDLERKIND enmKind, 9462 R3PTRTYPE(PFNPGMPHYSHANDLER) pfnHandlerR3, 9463 const char *pszHandlerR0, const char *pszPfHandlerR0, 9464 const char *pszHandlerRC, const char *pszPfHandlerRC, 9465 const char *pszDesc, PPGMPHYSHANDLERTYPE phType) 9466 { 9467 return pDevIns->pHlpR3->pfnPGMHandlerPhysicalTypeRegister(pDevIns, enmKind, pfnHandlerR3, 9468 pszHandlerR0, pszPfHandlerR0, 9469 pszHandlerRC, pszPfHandlerRC, 9470 pszDesc, phType); 9471 } 9471 PFNPGMPHYSHANDLER pfnHandler, const char *pszDesc, 9472 PPGMPHYSHANDLERTYPE phType) 9473 { 9474 return pDevIns->pHlpR3->pfnPGMHandlerPhysicalTypeRegister(pDevIns, enmKind, pfnHandler, pszDesc, phType); 9475 } 9476 9477 #elif defined(IN_RING0) 9478 9479 /** 9480 * @copydoc PDMDEVHLPR0::pfnPGMHandlerPhysicalTypeSetUpContext 9481 */ 9482 DECLINLINE(int) PDMDevHlpPGMHandlerPhysicalTypeSetUpContext(PPDMDEVINS pDevIns, PGMPHYSHANDLERKIND enmKind, 9483 PFNPGMPHYSHANDLER pfnHandler, PFNPGMRZPHYSPFHANDLER pfnPfHandler, 9484 const char *pszDesc, PGMPHYSHANDLERTYPE hType) 9485 { 9486 return pDevIns->pHlpR0->pfnPGMHandlerPhysicalTypeSetUpContext(pDevIns, enmKind, pfnHandler, pfnPfHandler, pszDesc, hType); 9487 } 9488 9489 #endif 9490 #ifdef IN_RING3 9472 9491 9473 9492 /** -
trunk/include/VBox/vmm/pgm.h
r93635 r93650 116 116 typedef enum PGMPHYSHANDLERKIND 117 117 { 118 /** Invalid zero value. */ 119 PGMPHYSHANDLERKIND_INVALID = 0, 118 120 /** MMIO range. Pages are not present, all access is done in interpreter or recompiler. */ 119 PGMPHYSHANDLERKIND_MMIO = 1,121 PGMPHYSHANDLERKIND_MMIO, 120 122 /** Handler all write access to a physical page range. */ 121 123 PGMPHYSHANDLERKIND_WRITE, 122 124 /** Handler all access to a physical page range. */ 123 PGMPHYSHANDLERKIND_ALL 124 125 PGMPHYSHANDLERKIND_ALL, 126 /** End of the valid values. */ 127 PGMPHYSHANDLERKIND_END, 128 /** Type size hack. */ 129 PGMPHYSHANDLERKIND_32BIT_HACK = 0x7fffffff, 125 130 } PGMPHYSHANDLERKIND; 126 131 … … 625 630 * cross contexts without needing fixing up). Callbacks and handler type is 626 631 * associated with this and it is shared by all handler registrations. */ 627 typedef uint 32_t PGMPHYSHANDLERTYPE;632 typedef uint64_t PGMPHYSHANDLERTYPE; 628 633 /** Pointer to a PGM physical handler type registration handle. */ 629 634 typedef PGMPHYSHANDLERTYPE *PPGMPHYSHANDLERTYPE; 630 635 /** NIL value for PGM physical access handler type handle. */ 631 #define NIL_PGMPHYSHANDLERTYPE UINT32_MAX 632 VMMDECL(uint32_t) PGMHandlerPhysicalTypeRelease(PVMCC pVM, PGMPHYSHANDLERTYPE hType); 633 VMMDECL(uint32_t) PGMHandlerPhysicalTypeRetain(PVM pVM, PGMPHYSHANDLERTYPE hType); 634 636 #define NIL_PGMPHYSHANDLERTYPE UINT64_MAX 635 637 VMMDECL(int) PGMHandlerPhysicalRegister(PVMCC pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysLast, PGMPHYSHANDLERTYPE hType, 636 638 uint64_t uUser, R3PTRTYPE(const char *) pszDesc); … … 646 648 VMMDECL(int) PGMHandlerPhysicalReset(PVMCC pVM, RTGCPHYS GCPhys); 647 649 VMMDECL(bool) PGMHandlerPhysicalIsRegistered(PVMCC pVM, RTGCPHYS GCPhys); 650 651 /** @name PGMPHYSHANDLER_F_XXX - flags for PGMR3HandlerPhysicalTypeRegister and PGMR0HandlerPhysicalTypeRegister 652 * @{ */ 653 /** Whether to hold the PGM lock while calling the handler or not. 654 * Mainly an optimization for PGM callers. */ 655 #define PGMPHYSHANDLER_F_KEEP_PGM_LOCK RT_BIT_32(0) 656 /** The uUser value is a ring-0 device instance index that needs translating 657 * into a PDMDEVINS pointer before calling the handler. This is a hack to make 658 * it possible to use access handlers in devices. */ 659 #define PGMPHYSHANDLER_F_R0_DEVINS_IDX RT_BIT_32(1) 660 /** Mask of valid bits. */ 661 #define PGMPHYSHANDLER_F_VALID_MASK UINT32_C(3) 662 /** @} */ 648 663 649 664 … … 914 929 VMMR0_INT_DECL(int) PGMR0InitPerVMData(PGVM pGVM, RTR0MEMOBJ hMemObj); 915 930 VMMR0_INT_DECL(int) PGMR0InitVM(PGVM pGVM); 931 VMMR0_INT_DECL(void) PGMR0DoneInitVM(PGVM pGVM); 916 932 VMMR0_INT_DECL(void) PGMR0CleanupVM(PGVM pGVM); 917 933 VMMR0_INT_DECL(int) PGMR0PhysAllocateHandyPages(PGVM pGVM, VMCPUID idCpu); … … 921 937 size_t offSub, size_t cbSub, void **ppvMapping); 922 938 VMMR0_INT_DECL(int) PGMR0PhysSetupIoMmu(PGVM pGVM); 939 VMMR0_INT_DECL(int) PGMR0HandlerPhysicalTypeSetUpContext(PGVM pGVM, PGMPHYSHANDLERKIND enmKind, uint32_t fFlags, 940 PFNPGMPHYSHANDLER pfnHandler, PFNPGMRZPHYSPFHANDLER pfnPfHandler, 941 const char *pszDesc, PGMPHYSHANDLERTYPE hType); 942 923 943 VMMR0DECL(int) PGMR0SharedModuleCheck(PVMCC pVM, PGVM pGVM, VMCPUID idCpu, PGMMSHAREDMODULE pModule, 924 944 PCRTGCPTR64 paRegionsGCPtrs); … … 1005 1025 VMMDECL(void) PGMR3PhysSetA20(PVMCPU pVCpu, bool fEnable); 1006 1026 1007 VMMR3_INT_DECL(int) PGMR3HandlerPhysicalTypeRegisterEx(PVM pVM, PGMPHYSHANDLERKIND enmKind, uint32_t fFlags, 1008 PFNPGMPHYSHANDLER pfnHandlerR3, 1009 R0PTRTYPE(PFNPGMPHYSHANDLER) pfnHandlerR0, 1010 R0PTRTYPE(PFNPGMRZPHYSPFHANDLER) pfnPfHandlerR0, 1011 const char *pszDesc, PPGMPHYSHANDLERTYPE phType); 1012 VMMR3DECL(int) PGMR3HandlerPhysicalTypeRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, uint32_t fFlags, 1013 R3PTRTYPE(PFNPGMPHYSHANDLER) pfnHandlerR3, 1014 const char *pszModR0, const char *pszHandlerR0, const char *pszPfHandlerR0, 1015 const char *pszModRC, const char *pszHandlerRC, const char *pszPfHandlerRC, 1016 const char *pszDesc, 1027 VMMR3_INT_DECL(int) PGMR3HandlerPhysicalTypeRegister(PVM pVM, PGMPHYSHANDLERKIND enmKind, uint32_t fFlags, 1028 PFNPGMPHYSHANDLER pfnHandlerR3, const char *pszDesc, 1017 1029 PPGMPHYSHANDLERTYPE phType); 1018 /** @name PGMPHYSHANDLER_F_XXX - flags for PGMR3HandlerPhysicalTypeRegister1019 * @{ */1020 /** Whether to hold the PGM lock while calling the handler or not.1021 * Mainly an optimization for PGM callers. */1022 #define PGMPHYSHANDLER_F_KEEP_PGM_LOCK RT_BIT_32(0)1023 /** The uUser value is a ring-0 device instance index that needs translating1024 * into a PDMDEVINS pointer before calling the handler. This is a hack to make1025 * it possible to use access handlers in devices. */1026 #define PGMPHYSHANDLER_F_R0_DEVINS_IDX RT_BIT_32(1)1027 /** Mask of valid bits. */1028 #define PGMPHYSHANDLER_F_VALID_MASK UINT32_C(3)1029 /** @} */1030 1030 1031 1031 VMMR3_INT_DECL(int) PGMR3PoolGrow(PVM pVM, PVMCPU pVCpu); -
trunk/include/VBox/vmm/vm.h
r93635 r93650 1443 1443 } cfgm; 1444 1444 1445 /** IEM part. */ 1446 union 1447 { 1448 #ifdef VMM_INCLUDED_SRC_include_IEMInternal_h 1449 struct IEM s; 1450 #endif 1451 uint8_t padding[8]; /* multiple of 8 */ 1452 } iem; 1453 1445 1454 /** Statistics for ring-0 only components. */ 1446 1455 struct … … 1458 1467 1459 1468 /** Padding for aligning the structure size on a page boundrary. */ 1460 uint8_t abAlignment2[89 20- sizeof(PVMCPUR3) * VMM_MAX_CPU_COUNT];1469 uint8_t abAlignment2[8912 - sizeof(PVMCPUR3) * VMM_MAX_CPU_COUNT]; 1461 1470 1462 1471 /* ---- end small stuff ---- */ -
trunk/include/VBox/vmm/vm.mac
r93635 r93650 163 163 .vm resb 32 164 164 .cfgm resb 8 165 .iem resb 8 165 166 .R0Stats resb 64 166 167
Note:
See TracChangeset
for help on using the changeset viewer.