Changeset 29086 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 5, 2010 2:05:17 PM (15 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/GMM.cpp
r29024 r29086 391 391 * @see GMMR0RegisterSharedModule 392 392 */ 393 GMMR3DECL(int) GMMR3UnregisterSharedModule(PVM pVM, char *pszModuleName, char *pszVersion, RTGCPTR GCBaseAddr, uint32_t cbModule) 394 { 395 GMMUNREGISTERSHAREDMODULEREQ Req; 396 Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 397 Req.Hdr.cbReq = sizeof(Req); 398 399 Req.GCBaseAddr = GCBaseAddr; 400 Req.cbModule = cbModule; 401 402 if ( RTStrCopy(Req.szName, sizeof(Req.szName), pszModuleName) != VINF_SUCCESS 403 || RTStrCopy(Req.szVersion, sizeof(Req.szVersion), pszVersion) != VINF_SUCCESS) 404 { 405 return VERR_BUFFER_OVERFLOW; 406 } 407 408 return VMMR3CallR0(pVM, VMMR0_DO_GMM_UNREGISTER_SHARED_MODULE, 0, &Req.Hdr); 393 GMMR3DECL(int) GMMR3UnregisterSharedModule(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pReq) 394 { 395 pReq->Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 396 pReq->Hdr.cbReq = sizeof(*pReq); 397 return VMMR3CallR0(pVM, VMMR0_DO_GMM_UNREGISTER_SHARED_MODULE, 0, &pReq->Hdr); 409 398 } 410 399 -
trunk/src/VBox/VMM/PGMSharedPage.cpp
r29024 r29086 54 54 unsigned cFlushedPages = 0; 55 55 56 /** todo count copy-on-write actions in the trap handler so we don't check everything all the time! */56 /** todo count copy-on-write actions in the trap handler so we don't have to check everything all the time! */ 57 57 58 58 /* Count the number of shared pages that were changed (copy-on-write). */ … … 124 124 AssertReturn(pReq, VERR_NO_MEMORY); 125 125 126 pReq->Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC;127 pReq->Hdr.cbReq = sizeof(*pReq);128 126 pReq->GCBaseAddr = GCBaseAddr; 129 127 pReq->cbModule = cbModule; … … 146 144 } 147 145 146 147 #ifdef VBOX_WITH_PAGE_SHARING 148 /** 149 * Shared module unregistration helper (called on the way out). 150 * 151 * @param pVM The VM handle. 152 * @param pReq Unregistration request info 153 */ 154 static DECLCALLBACK(void) pgmR3SharedModuleUnregisterHelper(PVM pVM, PGMMREGISTERSHAREDMODULEREQ pReq) 155 { 156 int rc; 157 158 rc = GMMR3UnregisterSharedModule(pVM, pReq); 159 RTMemFree(pReq); 160 return; 161 } 162 #endif 148 163 149 164 /** … … 160 175 { 161 176 #ifdef VBOX_WITH_PAGE_SHARING 162 return GMMR3UnregisterSharedModule(pVM, pszModuleName, pszVersion, GCBaseAddr, cbModule); 177 PGMMUNREGISTERSHAREDMODULEREQ pReq; 178 179 pReq = (PGMMUNREGISTERSHAREDMODULEREQ)RTMemAllocZ(sizeof(*pReq)); 180 AssertReturn(pReq, VERR_NO_MEMORY); 181 182 pReq->GCBaseAddr = GCBaseAddr; 183 pReq->cbModule = cbModule; 184 185 if ( RTStrCopy(pReq->szName, sizeof(pReq->szName), pszModuleName) != VINF_SUCCESS 186 || RTStrCopy(pReq->szVersion, sizeof(pReq->szVersion), pszVersion) != VINF_SUCCESS) 187 { 188 return VERR_BUFFER_OVERFLOW; 189 } 190 /* Queue the actual registration as we are under the IOM lock right now. Perform this operation on the way out. */ 191 return VMR3ReqCallNoWait(pVM, VMMGetCpuId(pVM), (PFNRT)pgmR3SharedModuleUnregisterHelper, 2, pVM, pReq); 163 192 #else 164 193 return VERR_NOT_IMPLEMENTED;
Note:
See TracChangeset
for help on using the changeset viewer.