- Timestamp:
- Jan 26, 2022 7:57:06 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r93438 r93449 7354 7354 TEMPLATE_VBoxR3ExtPack_LIBS = \ 7355 7355 $(TEMPLATE_LIBS_VBOXR3) \ 7356 $(if-expr "$(VBOX_LIB_VMM_LAZY)" == "$(LIB_VMM)", $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_LIB), $(VBOX_LIB_VMM_LAZY)) \7357 7356 $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_LIB) 7358 7357 else 7359 7358 TEMPLATE_VBoxR3ExtPack_LIBS = \ 7360 7359 $(TEMPLATE_LIBS_VBOXR3) \ 7361 $(if-expr "$(VBOX_LIB_VMM_LAZY)" == "$(LIB_VMM)", $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_DLL), $(VBOX_LIB_VMM_LAZY)) \7362 7360 $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_DLL) 7363 7361 endif … … 7365 7363 TEMPLATE_VBoxR3ExtPack_LIBS = \ 7366 7364 $(TEMPLATE_LIBS_VBOXR3) \ 7367 $(LIB_RUNTIME) \ 7368 $(VBOX_LIB_VMM_LAZY) 7365 $(LIB_RUNTIME) 7369 7366 endif 7370 7367 ifeq ($(KBUILD_TARGET),darwin) … … 7385 7382 TEMPLATE_VBoxR3ExtPackApi_LIBS = \ 7386 7383 $(TEMPLATE_LIBS_VBOXR3) \ 7387 $(if-expr "$(VBOX_LIB_VMM_LAZY)" == "$(LIB_VMM)", $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_LIB), $(VBOX_LIB_VMM_LAZY)) \7388 7384 $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_LIB) 7389 7385 else 7390 7386 TEMPLATE_VBoxR3ExtPackApi_LIBS = \ 7391 7387 $(TEMPLATE_LIBS_VBOXR3) \ 7392 $(if-expr "$(VBOX_LIB_VMM_LAZY)" == "$(LIB_VMM)", $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_DLL), $(VBOX_LIB_VMM_LAZY)) \7393 7388 $(PATH_STAGE_LIB)/VBoxRTImp$(VBOX_SUFF_DLL) 7394 7389 endif … … 7396 7391 TEMPLATE_VBoxR3ExtPackApi_LIBS = \ 7397 7392 $(TEMPLATE_LIBS_VBOXR3) \ 7398 $(LIB_RUNTIME) \ 7399 $(VBOX_LIB_VMM_LAZY) 7393 $(LIB_RUNTIME) 7400 7394 endif 7401 7395 ifeq ($(KBUILD_TARGET),darwin) … … 7661 7655 $(VBOX_LIBS_QT) \ 7662 7656 $(LIB_RUNTIME) \ 7663 $(VBOX_LIB_VMM_LAZY) \7664 7657 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/vcruntime.lib \ 7665 7658 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \ … … 7676 7669 $(VBOX_LIBS_QT) \ 7677 7670 $(LIB_RUNTIME) \ 7678 $(VBOX_LIB_VMM_LAZY) \7679 7671 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \ 7680 7672 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \ … … 7730 7722 TEMPLATE_VBOXQTGUIEXE_LIBS = \ 7731 7723 $(VBOX_LIBS_QT) \ 7732 $(LIB_RUNTIME) \ 7733 $(if-expr "$(LIB_VMM)" == "$(VBOX_LIB_VMM_LAZY)",$(LIB_REM),) \ 7734 $(VBOX_LIB_VMM_LAZY) 7724 $(LIB_RUNTIME) 7735 7725 7736 7726 ifeq ($(KBUILD_TARGET),linux) -
trunk/include/VBox/ExtPack/ExtPack.h
r93115 r93449 536 536 * @param pConsole The console interface. 537 537 * @param pVM The cross context VM structure. 538 */ 539 DECLCALLBACKMEMBER(int, pfnVMConfigureVMM,(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM)); 538 * @param pVMM The VMM function table. 539 */ 540 DECLCALLBACKMEMBER(int, pfnVMConfigureVMM,(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, 541 PVM pVM, PCVMMR3VTABLE pVMM)); 540 542 541 543 /** … … 546 548 * @param pConsole The console interface. 547 549 * @param pVM The cross context VM structure. 548 */ 549 DECLCALLBACKMEMBER(int, pfnVMPowerOn,(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM)); 550 * @param pVMM The VMM function table. 551 */ 552 DECLCALLBACKMEMBER(int, pfnVMPowerOn,(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, 553 PVM pVM, PCVMMR3VTABLE pVMM)); 550 554 551 555 /** … … 555 559 * @param pConsole The console interface. 556 560 * @param pVM The cross context VM structure. Can be NULL. 557 */ 558 DECLCALLBACKMEMBER(void, pfnVMPowerOff,(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, PVM pVM)); 561 * @param pVMM The VMM function table. 562 */ 563 DECLCALLBACKMEMBER(void, pfnVMPowerOff,(PCVBOXEXTPACKVMREG pThis, VBOXEXTPACK_IF_CS(IConsole) *pConsole, 564 PVM pVM, PCVMMR3VTABLE pVMM)); 559 565 560 566 /** … … 581 587 } VBOXEXTPACKVMREG; 582 588 /** Current version of the VBOXEXTPACKVMREG structure. */ 583 #define VBOXEXTPACKVMREG_VERSION RT_MAKE_U32( 0, 3)589 #define VBOXEXTPACKVMREG_VERSION RT_MAKE_U32(1, 0) 584 590 585 591 -
trunk/src/VBox/Main/Makefile.kmk
r93444 r93449 566 566 nsl \ 567 567 devinfo \ 568 socket \ 569 $(LIB_VMM) 568 socket 570 569 571 570 VBoxSVC_LIBS.win += \ -
trunk/src/VBox/Main/include/ExtPackManagerImpl.h
r93115 r93449 125 125 #endif 126 126 #ifdef VBOX_COM_INPROC 127 bool i_callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc); 128 bool i_callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc); 129 bool i_callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock); 127 bool i_callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM, 128 AutoWriteLock *a_pLock, int *a_pvrc); 129 bool i_callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM, AutoWriteLock *a_pLock, int *a_pvrc); 130 bool i_callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM, AutoWriteLock *a_pLock); 130 131 #endif 131 132 HRESULT i_checkVrde(void); … … 254 255 #endif 255 256 #ifdef VBOX_COM_INPROC 256 int i_callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM );257 int i_callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM );258 void i_callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM );257 int i_callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM); 258 int i_callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM); 259 void i_callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM); 259 260 #endif 260 261 HRESULT i_checkVrdeExtPack(Utf8Str const *a_pstrExtPack); -
trunk/src/VBox/Main/src-all/ExtPackManagerImpl.cpp
r93115 r93449 1033 1033 1034 1034 #ifdef VBOX_COM_INPROC 1035 1035 1036 /** 1036 1037 * Calls the pfnVMConfigureVMM hook. 1037 1038 * 1038 1039 * @returns true if we left the lock, false if we didn't. 1039 * @param a_pConsole The console interface. 1040 * @param a_pVM The VM handle. 1041 * @param a_pLock The write lock held by the caller. 1042 * @param a_pvrc Where to return the status code of the 1043 * callback. This is always set. LogRel is 1044 * called on if a failure status is returned. 1045 */ 1046 bool ExtPack::i_callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc) 1040 * @param a_pConsole The console interface. 1041 * @param a_pVM The VM handle. 1042 * @param a_pVMM The VMM function table. 1043 * @param a_pLock The write lock held by the caller. 1044 * @param a_pvrc Where to return the status code of the callback. This 1045 * is always set. LogRel is called on if a failure status 1046 * is returned. 1047 */ 1048 bool ExtPack::i_callVmConfigureVmmHook(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM, AutoWriteLock *a_pLock, int *a_pvrc) 1047 1049 { 1048 1050 *a_pvrc = VINF_SUCCESS; … … 1055 1057 ComPtr<ExtPack> ptrSelfRef = this; 1056 1058 a_pLock->release(); 1057 int vrc = m->pReg->pfnVMConfigureVMM(m->pReg, a_pConsole, a_pVM );1059 int vrc = m->pReg->pfnVMConfigureVMM(m->pReg, a_pConsole, a_pVM, a_pVMM); 1058 1060 *a_pvrc = vrc; 1059 1061 a_pLock->acquire(); … … 1070 1072 * 1071 1073 * @returns true if we left the lock, false if we didn't. 1072 * @param a_pConsole The console interface. 1073 * @param a_pVM The VM handle. 1074 * @param a_pLock The write lock held by the caller. 1075 * @param a_pvrc Where to return the status code of the 1076 * callback. This is always set. LogRel is 1077 * called on if a failure status is returned. 1078 */ 1079 bool ExtPack::i_callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock, int *a_pvrc) 1074 * @param a_pConsole The console interface. 1075 * @param a_pVM The VM handle. 1076 * @param a_pVMM The VMM function table. 1077 * @param a_pLock The write lock held by the caller. 1078 * @param a_pvrc Where to return the status code of the callback. This 1079 * is always set. LogRel is called on if a failure status 1080 * is returned. 1081 */ 1082 bool ExtPack::i_callVmPowerOnHook(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM, AutoWriteLock *a_pLock, int *a_pvrc) 1080 1083 { 1081 1084 *a_pvrc = VINF_SUCCESS; … … 1088 1091 ComPtr<ExtPack> ptrSelfRef = this; 1089 1092 a_pLock->release(); 1090 int vrc = m->pReg->pfnVMPowerOn(m->pReg, a_pConsole, a_pVM );1093 int vrc = m->pReg->pfnVMPowerOn(m->pReg, a_pConsole, a_pVM, a_pVMM); 1091 1094 *a_pvrc = vrc; 1092 1095 a_pLock->acquire(); … … 1103 1106 * 1104 1107 * @returns true if we left the lock, false if we didn't. 1105 * @param a_pConsole The console interface. 1106 * @param a_pVM The VM handle. 1107 * @param a_pLock The write lock held by the caller. 1108 */ 1109 bool ExtPack::i_callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, AutoWriteLock *a_pLock) 1108 * @param a_pConsole The console interface. 1109 * @param a_pVM The VM handle. 1110 * @param a_pVMM The VMM function table. 1111 * @param a_pLock The write lock held by the caller. 1112 */ 1113 bool ExtPack::i_callVmPowerOffHook(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM, AutoWriteLock *a_pLock) 1110 1114 { 1111 1115 if ( m != NULL … … 1117 1121 ComPtr<ExtPack> ptrSelfRef = this; 1118 1122 a_pLock->release(); 1119 m->pReg->pfnVMPowerOff(m->pReg, a_pConsole, a_pVM );1123 m->pReg->pfnVMPowerOff(m->pReg, a_pConsole, a_pVM, a_pVMM); 1120 1124 a_pLock->acquire(); 1121 1125 return true; … … 1124 1128 return false; 1125 1129 } 1130 1126 1131 #endif /* VBOX_COM_INPROC */ 1127 1132 … … 3364 3369 3365 3370 #ifdef VBOX_COM_INPROC 3371 3366 3372 /** 3367 3373 * Calls the pfnVMConfigureVMM hook for all working extension packs. … … 3369 3375 * @returns VBox status code. Stops on the first failure, expecting the caller 3370 3376 * to signal this to the caller of the CFGM constructor. 3371 * @param a_pConsole The console interface for the VM. 3372 * @param a_pVM The VM handle. 3373 */ 3374 int ExtPackManager::i_callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM) 3377 * @param a_pConsole The console interface for the VM. 3378 * @param a_pVM The VM handle. 3379 * @param a_pVMM The VMM function table. 3380 */ 3381 int ExtPackManager::i_callAllVmConfigureVmmHooks(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM) 3375 3382 { 3376 3383 AutoCaller autoCaller(this); … … 3385 3392 { 3386 3393 int vrc; 3387 (*it)->i_callVmConfigureVmmHook(a_pConsole, a_pVM, &autoLock, &vrc);3394 (*it)->i_callVmConfigureVmmHook(a_pConsole, a_pVM, a_pVMM, &autoLock, &vrc); 3388 3395 if (RT_FAILURE(vrc)) 3389 3396 return vrc; … … 3398 3405 * @returns VBox status code. Stops on the first failure, expecting the caller 3399 3406 * to not power on the VM. 3400 * @param a_pConsole The console interface for the VM. 3401 * @param a_pVM The VM handle. 3402 */ 3403 int ExtPackManager::i_callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM) 3407 * @param a_pConsole The console interface for the VM. 3408 * @param a_pVM The VM handle. 3409 * @param a_pVMM The VMM function table. 3410 */ 3411 int ExtPackManager::i_callAllVmPowerOnHooks(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM) 3404 3412 { 3405 3413 AutoCaller autoCaller(this); … … 3414 3422 { 3415 3423 int vrc; 3416 (*it)->i_callVmPowerOnHook(a_pConsole, a_pVM, &autoLock, &vrc);3424 (*it)->i_callVmPowerOnHook(a_pConsole, a_pVM, a_pVMM, &autoLock, &vrc); 3417 3425 if (RT_FAILURE(vrc)) 3418 3426 return vrc; … … 3425 3433 * Calls the pfnVMPowerOff hook for all working extension packs. 3426 3434 * 3427 * @param a_pConsole The console interface for the VM. 3428 * @param a_pVM The VM handle. Can be NULL. 3429 */ 3430 void ExtPackManager::i_callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM) 3435 * @param a_pConsole The console interface for the VM. 3436 * @param a_pVM The VM handle. Can be NULL. 3437 * @param a_pVMM The VMM function table. 3438 */ 3439 void ExtPackManager::i_callAllVmPowerOffHooks(IConsole *a_pConsole, PVM a_pVM, PCVMMR3VTABLE a_pVMM) 3431 3440 { 3432 3441 AutoCaller autoCaller(this); … … 3439 3448 3440 3449 for (ExtPackList::iterator it = llExtPacks.begin(); it != llExtPacks.end(); ++it) 3441 (*it)->i_callVmPowerOffHook(a_pConsole, a_pVM, &autoLock);3442 } 3443 #endif 3444 3450 (*it)->i_callVmPowerOffHook(a_pConsole, a_pVM, a_pVMM, &autoLock); 3451 } 3452 3453 #endif /* VBOX_COM_INPROC */ 3445 3454 3446 3455 /** -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r93444 r93449 6787 6787 { 6788 6788 #ifdef VBOX_WITH_EXTPACK 6789 vrc = mptrExtPackManager->i_callAllVmPowerOnHooks(this, ptrVM.vtable()->pfnVMR3GetVM(ptrVM.rawUVM()) );6789 vrc = mptrExtPackManager->i_callAllVmPowerOnHooks(this, ptrVM.vtable()->pfnVMR3GetVM(ptrVM.rawUVM()), ptrVM.vtable()); 6790 6790 #else 6791 6791 vrc = VINF_SUCCESS; … … 8388 8388 vrc = pVMM->pfnVMR3PowerOff(pUVM); 8389 8389 #ifdef VBOX_WITH_EXTPACK 8390 mptrExtPackManager->i_callAllVmPowerOffHooks(this, pVMM->pfnVMR3GetVM(pUVM) );8390 mptrExtPackManager->i_callAllVmPowerOffHooks(this, pVMM->pfnVMR3GetVM(pUVM), pVMM); 8391 8391 #endif 8392 8392 alock.acquire(); … … 10498 10498 /* Start/Resume the VM execution */ 10499 10499 #ifdef VBOX_WITH_EXTPACK 10500 vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM );10500 vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM, pVMM); 10501 10501 #endif 10502 10502 if (RT_SUCCESS(vrc)) … … 10511 10511 int vrc2 = pVMM->pfnVMR3PowerOff(pConsole->mpUVM); AssertLogRelRC(vrc2); 10512 10512 #ifdef VBOX_WITH_EXTPACK 10513 pConsole->mptrExtPackManager->i_callAllVmPowerOffHooks(pConsole, pVM );10513 pConsole->mptrExtPackManager->i_callAllVmPowerOffHooks(pConsole, pVM, pVMM); 10514 10514 #endif 10515 10515 } … … 10526 10526 int vrc2 = pVMM->pfnVMR3PowerOff(pConsole->mpUVM); AssertLogRelRC(vrc2); 10527 10527 #ifdef VBOX_WITH_EXTPACK 10528 pConsole->mptrExtPackManager->i_callAllVmPowerOffHooks(pConsole, pVM );10528 pConsole->mptrExtPackManager->i_callAllVmPowerOffHooks(pConsole, pVM, pVMM); 10529 10529 #endif 10530 10530 } … … 10537 10537 /* Power on the VM (i.e. start executing) */ 10538 10538 #ifdef VBOX_WITH_EXTPACK 10539 vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM );10539 vrc = pConsole->mptrExtPackManager->i_callAllVmPowerOnHooks(pConsole, pVM, pVMM); 10540 10540 #endif 10541 10541 if (RT_SUCCESS(vrc)) -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r93444 r93449 3716 3716 { 3717 3717 pAlock->release(); 3718 rc = mptrExtPackManager->i_callAllVmConfigureVmmHooks(this, pVM );3718 rc = mptrExtPackManager->i_callAllVmConfigureVmmHooks(this, pVM, pVMM); 3719 3719 pAlock->acquire(); 3720 3720 }
Note:
See TracChangeset
for help on using the changeset viewer.