Changeset 21645 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jul 16, 2009 12:05:21 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50177
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCM.cpp
r21213 r21645 1383 1383 1384 1384 /** 1385 * Enable patching in a VT-x/AMD-V guest 1386 * 1387 * @returns VBox status code. 1388 * @param pVM The VM to operate on. 1389 */ 1390 VMMR3DECL(int) HWACMMR3EnablePatching(PVM pVM) 1391 { 1392 return VINF_SUCCESS; 1393 } 1394 1395 /** 1396 * Disable patching in a VT-x/AMD-V guest 1397 * 1398 * @returns VBox status code. 1399 * @param pVM The VM to operate on. 1400 */ 1401 VMMR3DECL(int) HWACMMR3DisablePatching(PVM pVM) 1402 { 1403 return VINF_SUCCESS; 1404 } 1405 1406 /** 1385 1407 * Force execution of the current IO code in the recompiler 1386 1408 * -
trunk/src/VBox/VMM/VMM.cpp
r21644 r21645 1305 1305 1306 1306 /** 1307 * Sets the guest memory range that can be used for patching 1308 * 1307 * Registers the guest memory range that can be used for patching 1308 * 1309 * @returns VBox status code. 1309 1310 * @param pVM The VM to operate on. 1310 1311 * @param pPatchMem Patch memory range 1311 1312 * @param cbPatchMem Size of the memory range 1312 1313 */ 1313 VMMR3DECL(int) VMMR3SetPatchMemory(PVM pVM, RTGCPTR pPatchPage, unsigned cbPatch) 1314 { 1314 VMMR3DECL(int) VMMR3RegisterPatchMemory(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem) 1315 { 1316 if (HWACCMIsEnabled(pVM)) 1317 HWACMMR3EnablePatching(pVM); 1318 1315 1319 return VERR_ACCESS_DENIED; 1316 1320 } 1317 1321 1318 1322 /** 1319 * Clears the guest memory range that can be used for patching 1320 * 1323 * Deregisters the guest memory range that can be used for patching 1324 * 1325 * @returns VBox status code. 1321 1326 * @param pVM The VM to operate on. 1322 1327 * @param pPatchMem Patch memory range 1323 1328 * @param cbPatchMem Size of the memory range 1324 1329 */ 1325 VMMR3DECL(int) VMMR3ClearPatchMemory(PVM pVM, RTGCPTR pPatchPage, unsigned cbPatch) 1326 { 1330 VMMR3DECL(int) VMMR3DeregisterPatchMemory(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem) 1331 { 1332 if (HWACCMIsEnabled(pVM)) 1333 { 1334 int rc = HWACMMR3DisablePatching(pVM); 1335 if (VBOX_FAILURE(rc)) 1336 return rc; 1337 } 1338 1327 1339 return VINF_SUCCESS; 1328 1340 }
Note:
See TracChangeset
for help on using the changeset viewer.