Changeset 20035 in vbox
- Timestamp:
- May 26, 2009 12:56:35 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 47767
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCM.cpp
r20026 r20035 307 307 * Register the saved state data unit. 308 308 */ 309 int rc = SSMR3RegisterInternal(pVM, "HWACCM", 0, HWACCM_SSM_VERSION , sizeof(HWACCM),309 int rc = SSMR3RegisterInternal(pVM, "HWACCM", 0, HWACCM_SSM_VERSION_3_0_X, sizeof(HWACCM), 310 310 NULL, hwaccmR3Save, NULL, 311 311 NULL, hwaccmR3Load, NULL); … … 1697 1697 } 1698 1698 1699 rc = SSMR3PutBool(pSSM, pVM->hwaccm.s.svm.fTPRPatching); 1700 AssertRCReturn(rc, rc); 1701 1699 1702 return VINF_SUCCESS; 1700 1703 } … … 1717 1720 * Validate version. 1718 1721 */ 1719 if ( u32Version != HWACCM_SSM_VERSION 1720 && u32Version != HWACCM_SSM_VERSION_2_0_X) 1722 if ( u32Version != HWACCM_SSM_VERSION_2_2_X 1723 && u32Version != HWACCM_SSM_VERSION_2_0_X 1724 && u32Version != HWACCM_SSM_VERSION_3_0_X) 1721 1725 { 1722 1726 AssertMsgFailed(("hwaccmR3Load: Invalid version u32Version=%d!\n", u32Version)); … … 1732 1736 AssertRCReturn(rc, rc); 1733 1737 1734 if (u32Version >= HWACCM_SSM_VERSION )1738 if (u32Version >= HWACCM_SSM_VERSION_2_2_X) 1735 1739 { 1736 1740 uint32_t val; … … 1749 1753 } 1750 1754 } 1755 1756 if (u32Version >= HWACCM_SSM_VERSION_3_0_X) 1757 { 1758 rc = SSMR3GetBool(pSSM, &pVM->hwaccm.s.svm.fTPRPatching); 1759 AssertRCReturn(rc, rc); 1760 } 1761 1751 1762 return VINF_SUCCESS; 1752 1763 } -
trunk/src/VBox/VMM/HWACCMInternal.h
r20026 r20035 135 135 /** HWACCM SSM version 136 136 */ 137 #define HWACCM_SSM_VERSION 4 137 #define HWACCM_SSM_VERSION_3_0_X 5 138 #define HWACCM_SSM_VERSION_2_2_X 4 138 139 #define HWACCM_SSM_VERSION_2_0_X 3 139 140 … … 340 341 /** Set if erratum 170 affects the AMD cpu. */ 341 342 bool fAlwaysFlushTLB; 342 /** Explicit alignment padding to make 32-bit gcc align u64RegisterMask 343 * naturally. */ 344 bool padding[1]; 343 /** Set if we're patching 32 bits guests to get rid of TPR access overhead. */ 344 bool fTPRPatching; 345 345 346 346 /** R0 memory object for the host VM control block (VMCB). */ -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r20032 r20035 1431 1431 * Forward the trap to the guest by injecting the exception and resuming execution. 1432 1432 */ 1433 Log(("Guest page fault at % RGv cr2=%RGv error code %x rsp=%RGv\n", (RTGCPTR)pCtx->rip, uFaultAddress, errCode, (RTGCPTR)pCtx->rsp));1433 Log(("Guest page fault at %04X:%RGv cr2=%RGv error code %x rsp=%RGv\n", pCtx->cs, (RTGCPTR)pCtx->rip, uFaultAddress, errCode, (RTGCPTR)pCtx->rsp)); 1434 1434 STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitGuestPF); 1435 1435 … … 1475 1475 if ( rc == VINF_SUCCESS 1476 1476 && Cpu.pCurInstr->opcode == OP_MOV 1477 && cbOp == 6)1477 && cbOp >= 5) 1478 1478 { 1479 1479 if ( (errCode & X86_TRAP_PF_RW) 1480 && Cpu.param1. parval ==uFaultAddress)1480 && Cpu.param1.disp32 == (uint32_t)uFaultAddress) 1481 1481 { 1482 pVM->hwaccm.s.svm.fTPRPatching = true; 1482 1483 Log(("Acceptable write candidate!\n")); 1483 1484 } 1484 1485 else 1485 if (Cpu.param2. parval ==uFaultAddress)1486 if (Cpu.param2.disp32 == (uint32_t)uFaultAddress) 1486 1487 { 1488 pVM->hwaccm.s.svm.fTPRPatching = true; 1487 1489 Log(("Acceptable read candidate!\n")); 1488 1490 } 1489 1491 } 1490 1491 1492 } 1492 1493 } … … 1589 1590 Event.n.u1ErrorCodeValid = 1; 1590 1591 Event.n.u32ErrorCode = pVMCB->ctrl.u64ExitInfo1; /* EXITINFO1 = error code */ 1592 Assert(pCtx->cs != 0xffcf || pCtx->eip != 0x4315); 1591 1593 break; 1592 1594 case X86_XCPT_DE: … … 1607 1609 break; 1608 1610 } 1609 Log(("Trap %x at % RGv esi=%x\n", vector, (RTGCPTR)pCtx->rip, pCtx->esi));1611 Log(("Trap %x at %04x:%RGv esi=%x\n", vector, pCtx->cs, (RTGCPTR)pCtx->rip, pCtx->esi)); 1610 1612 SVMR0InjectEvent(pVM, pVMCB, pCtx, &Event); 1611 1613
Note:
See TracChangeset
for help on using the changeset viewer.