Changeset 21979 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 5, 2009 11:08:09 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCM.cpp
r21709 r21979 1402 1402 DECLCALLBACK(int) hwaccmR3RemovePatches(PVM pVM, PVMCPU pVCpu, void *pvUser) 1403 1403 { 1404 VMCPUID idCpu = (VMCPUID)pvUser; 1405 1406 /* Only execute the handler on the VCPU the original patch request was issued. */ 1407 if (pVCpu->idCpu != idCpu) 1408 return VINF_SUCCESS; 1409 1404 1410 Log(("hwaccmR3RemovePatches\n")); 1405 1411 for (unsigned i = 0; i < pVM->hwaccm.s.svm.cPatches; i++) … … 1466 1472 return VERR_NOT_SUPPORTED; 1467 1473 1468 int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ON CE, hwaccmR3RemovePatches, NULL);1474 int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE, hwaccmR3RemovePatches, (void *)VMMGetCpuId(pVM)); 1469 1475 AssertRC(rc); 1470 1476 … … 1490 1496 Assert(pVM->hwaccm.s.cbGuestPatchMem == cbPatchMem); 1491 1497 1492 int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ON CE, hwaccmR3RemovePatches, NULL);1498 int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE, hwaccmR3RemovePatches, (void *)VMMGetCpuId(pVM)); 1493 1499 AssertRC(rc); 1494 1500 … … 1529 1535 else 1530 1536 if (pDis->param2.flags == USE_IMMEDIATE32) 1531 {1532 1537 u8Tpr = (uint8_t)pDis->param2.parval; 1533 }1534 1538 else 1535 1539 return VERR_EM_INTERPRETER; … … 1575 1579 DECLCALLBACK(int) hwaccmR3ReplaceTprInstr(PVM pVM, PVMCPU pVCpu, void *pvUser) 1576 1580 { 1577 PCPUMCTX pCtx = (PCPUMCTX)pvUser; 1581 VMCPUID idCpu = (VMCPUID)pvUser; 1582 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu); 1578 1583 RTGCPTR oldrip = pCtx->rip; 1579 1584 PDISCPUSTATE pDis = &pVCpu->hwaccm.s.DisState; 1580 1585 unsigned cbOp; 1586 1587 /* Only execute the handler on the VCPU the original patch request was issued. */ 1588 if (pVCpu->idCpu != idCpu) 1589 return VINF_SUCCESS; 1581 1590 1582 1591 Log(("hwaccmR3ReplaceTprInstr: %RGv\n", pCtx->rip)); … … 1707 1716 DECLCALLBACK(int) hwaccmR3PatchTprInstr(PVM pVM, PVMCPU pVCpu, void *pvUser) 1708 1717 { 1709 PCPUMCTX pCtx = (PCPUMCTX)pvUser; 1718 VMCPUID idCpu = (VMCPUID)pvUser; 1719 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(pVCpu); 1710 1720 PDISCPUSTATE pDis = &pVCpu->hwaccm.s.DisState; 1711 1721 unsigned cbOp; … … 1715 1725 char szOutput[256]; 1716 1726 #endif 1727 1728 /* Only execute the handler on the VCPU the original patch request was issued. */ 1729 if (pVCpu->idCpu != idCpu) 1730 return VINF_SUCCESS; 1717 1731 1718 1732 Log(("hwaccmR3PatchTprInstr %RGv\n", pCtx->rip)); … … 1908 1922 VMMR3DECL(int) HWACCMR3PatchTprInstr(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx) 1909 1923 { 1910 int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ON CE, (pVM->hwaccm.s.pGuestPatchMem) ? hwaccmR3PatchTprInstr : hwaccmR3ReplaceTprInstr, pCtx);1924 int rc = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE, (pVM->hwaccm.s.pGuestPatchMem) ? hwaccmR3PatchTprInstr : hwaccmR3ReplaceTprInstr, (void *)pVCpu->idCpu); 1911 1925 AssertRC(rc); 1912 1926 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.