Changeset 92721 in vbox for trunk/src/VBox
- Timestamp:
- Dec 2, 2021 10:42:04 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/GMM.cpp
r92703 r92721 266 266 GMMR3DECL(int) GMMR3BalloonedPages(PVM pVM, GMMBALLOONACTION enmAction, uint32_t cBalloonedPages) 267 267 { 268 GMMBALLOONEDPAGESREQ Req; 269 Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 270 Req.Hdr.cbReq = sizeof(Req); 271 Req.enmAction = enmAction; 272 Req.cBalloonedPages = cBalloonedPages; 273 274 return VMMR3CallR0(pVM, VMMR0_DO_GMM_BALLOONED_PAGES, 0, &Req.Hdr); 268 int rc; 269 if (!SUPR3IsDriverless()) 270 { 271 GMMBALLOONEDPAGESREQ Req; 272 Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 273 Req.Hdr.cbReq = sizeof(Req); 274 Req.enmAction = enmAction; 275 Req.cBalloonedPages = cBalloonedPages; 276 277 rc = VMMR3CallR0(pVM, VMMR0_DO_GMM_BALLOONED_PAGES, 0, &Req.Hdr); 278 } 279 /* 280 * Ignore reset and fail all other requests. 281 */ 282 else if (enmAction == GMMBALLOONACTION_RESET && cBalloonedPages == 0) 283 rc = VINF_SUCCESS; 284 else 285 rc = VERR_SUP_DRIVERLESS; 286 return rc; 275 287 } 276 288 … … 395 407 GMMR3DECL(int) GMMR3ResetSharedModules(PVM pVM) 396 408 { 397 return VMMR3CallR0(pVM, VMMR0_DO_GMM_RESET_SHARED_MODULES, 0, NULL); 409 if (!SUPR3IsDriverless()) 410 return VMMR3CallR0(pVM, VMMR0_DO_GMM_RESET_SHARED_MODULES, 0, NULL); 411 return VINF_SUCCESS; 398 412 } 399 413 -
trunk/src/VBox/VMM/VMMR3/GVMMR3.cpp
r92713 r92721 118 118 * @returns VBox status code. 119 119 * @param pUVM The user mode VM handle. 120 * /121 VMMR3_INT_DECL(int) GVMMR3DestroyVM(PUVM pUVM) 122 { 123 PVM pVM = pUVM->pVM; 120 * @param pVM The cross context VM structure. 121 */ 122 VMMR3_INT_DECL(int) GVMMR3DestroyVM(PUVM pUVM, PVM pVM) 123 { 124 124 AssertPtrReturn(pVM, VERR_INVALID_VM_HANDLE); 125 125 Assert(pUVM->cCpus == pVM->cCpus); 126 RT_NOREF(pUVM); 126 127 127 128 int rc; … … 156 157 LogRel(("idCpu=%u rc=%Rrc\n", idCpu, rc)); 157 158 } 159 else 160 rc = VINF_SUCCESS; 161 return rc; 162 } 163 164 165 /** 166 * Deregister the calling EMT from GVM. 167 * 168 * @returns VBox status code. 169 * @param pVM The cross context VM structure. 170 * @param idCpu The Virtual CPU ID. 171 * @thread EMT(idCpu) 172 * @see GVMMR0DeregisterVCpu 173 */ 174 VMMR3_INT_DECL(int) GVMMR3DeregisterVCpu(PVM pVM, VMCPUID idCpu) 175 { 176 Assert(VMMGetCpuId(pVM) == idCpu); 177 int rc; 178 if (!SUPR3IsDriverless()) 179 rc = SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), idCpu, VMMR0_DO_GVMM_DEREGISTER_VMCPU, 0, NULL); 158 180 else 159 181 rc = VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r92703 r92721 2174 2174 * in there. (Not unlikely if the VM shuts down, apparently.) 2175 2175 */ 2176 rc = VMMR3CallR0(pVM, VMMR0_DO_PGM_FLUSH_HANDY_PAGES, 0, NULL); 2176 # ifdef VBOX_WITH_PGM_NEM_MODE 2177 if (!pVM->pgm.s.fNemMode) 2178 # endif 2179 rc = VMMR3CallR0(pVM, VMMR0_DO_PGM_FLUSH_HANDY_PAGES, 0, NULL); 2177 2180 #endif 2178 2181 -
trunk/src/VBox/VMM/VMMR3/VM.cpp
r92703 r92721 708 708 } 709 709 710 int rc2 = GVMMR3DestroyVM(pUVM );710 int rc2 = GVMMR3DestroyVM(pUVM, pVM); 711 711 AssertRC(rc2); 712 712 } -
trunk/src/VBox/VMM/VMMR3/VMEmt.cpp
r90784 r92721 24 24 #include <VBox/vmm/dbgf.h> 25 25 #include <VBox/vmm/em.h> 26 #include <VBox/vmm/gvmm.h> 26 27 #include <VBox/vmm/nem.h> 27 28 #include <VBox/vmm/pdmapi.h> … … 285 286 } 286 287 287 int rc2 = SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), 0 /*idCpu*/, VMMR0_DO_GVMM_DESTROY_VM, 0, NULL);288 int rc2 = GVMMR3DestroyVM(pUVM, pVM); 288 289 AssertLogRelRC(rc2); 289 290 } … … 292 293 && (pVM = pUVM->pVM) != NULL) 293 294 { 294 int rc2 = SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), idCpu, VMMR0_DO_GVMM_DEREGISTER_VMCPU, 0, NULL);295 int rc2 = GVMMR3DeregisterVCpu(pVM, idCpu); 295 296 AssertLogRelRC(rc2); 296 297 } … … 1347 1348 //enmHaltMethod = VMHALTMETHOD_OLD; 1348 1349 } 1349 LogRel(("VMEmt: Halt method %s (%d)\n", vmR3GetHaltMethodName(enmHaltMethod), enmHaltMethod)); 1350 1351 /* 1352 * The global halt method doesn't work in driverless mode, so fall back on 1353 * method #1 instead. 1354 */ 1355 if (!SUPR3IsDriverless() || enmHaltMethod != VMHALTMETHOD_GLOBAL_1) 1356 LogRel(("VMEmt: Halt method %s (%d)\n", vmR3GetHaltMethodName(enmHaltMethod), enmHaltMethod)); 1357 else 1358 { 1359 LogRel(("VMEmt: Halt method %s (%d) not available in driverless mode, using %s (%d) instead\n", 1360 vmR3GetHaltMethodName(enmHaltMethod), enmHaltMethod, vmR3GetHaltMethodName(VMHALTMETHOD_1), VMHALTMETHOD_1)); 1361 enmHaltMethod = VMHALTMETHOD_1; 1362 } 1363 1350 1364 1351 1365 /*
Note:
See TracChangeset
for help on using the changeset viewer.