Changeset 42045 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jul 9, 2012 6:45:52 AM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
r42044 r42045 866 866 pCpu->idCpu = idCpu; 867 867 pCpu->uCurrentASID = 0; /* we'll aways increment this the first time (host uses ASID 0) */ 868 pCpu->cTLBFlushes = 0; 869 pCpu->fASIDState = true; 868 /* Do NOT reset cTLBFlushes here, see @bugref{6255}. */ 870 869 871 870 /* Should never happen */ … … 940 939 { 941 940 g_HvmR0.aCpuInfo[iCpu].fConfigured = true; 941 g_HvmR0.aCpuInfo[iCpu].cTLBFlushes = 0; 942 942 Assert(g_HvmR0.aCpuInfo[iCpu].hMemObj == NIL_RTR0MEMOBJ); 943 943 } … … 947 947 } 948 948 else 949 AssertMsgFailed((" HWACCMR0EnableAllCpus/SUPR0EnableVTx: rc=%Rrc\n", rc));949 AssertMsgFailed(("hmR0EnableAllCpuOnce/SUPR0EnableVTx: rc=%Rrc\n", rc)); 950 950 } 951 951 else … … 968 968 } 969 969 g_HvmR0.aCpuInfo[i].fConfigured = false; 970 g_HvmR0.aCpuInfo[i].cTLBFlushes = 0; 970 971 } 971 972 … … 978 979 if (RT_SUCCESS(rc)) 979 980 rc = hmR0FirstRcGetStatus(&FirstRc); 980 AssertMsgRC(rc, (" HWACCMR0EnableAllCpusfailed for cpu %d with rc=%d\n", hmR0FirstRcGetCpuId(&FirstRc), rc));981 AssertMsgRC(rc, ("hmR0EnableAllCpuOnce failed for cpu %d with rc=%d\n", hmR0FirstRcGetCpuId(&FirstRc), rc)); 981 982 } 982 983 else -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r42044 r42045 166 166 * Ensure each VCPU scheduled on this CPU gets a new VPID on resume. See @bugref{6255}. 167 167 */ 168 pCpu->fASIDState = !pCpu->fASIDState;168 ++pCpu->cTLBFlushes; 169 169 170 170 return VINF_SUCCESS; … … 2400 2400 bool fNewASID = false; 2401 2401 if ( pVCpu->hwaccm.s.idLastCpu != pCpu->idCpu 2402 || pVCpu->hwaccm.s.cTLBFlushes != pCpu->cTLBFlushes 2403 || pVCpu->hwaccm.s.fASIDState != pCpu->fASIDState) 2402 || pVCpu->hwaccm.s.cTLBFlushes != pCpu->cTLBFlushes) 2404 2403 { 2405 2404 pVCpu->hwaccm.s.fForceTLBFlush = true; … … 2452 2451 } 2453 2452 2454 pVCpu->hwaccm.s.fASIDState = pCpu->fASIDState;2455 2453 pVCpu->hwaccm.s.cTLBFlushes = pCpu->cTLBFlushes; 2456 2454 pVCpu->hwaccm.s.fForceTLBFlush = false; … … 2459 2457 { 2460 2458 AssertMsg(pVCpu->hwaccm.s.uCurrentASID && pCpu->uCurrentASID, 2461 ("hwaccm->uCurrentASID=%lu hwaccm->cTLBFlushes=%lu cpu->uCurrentASID=%lu cpu->cTLBFlushes=%lu" 2462 "hwaccm->fASIDState=%d cpu->fASIDState=%d\n", 2459 ("hwaccm->uCurrentASID=%lu hwaccm->cTLBFlushes=%lu cpu->uCurrentASID=%lu cpu->cTLBFlushes=%lu\n", 2463 2460 pVCpu->hwaccm.s.uCurrentASID, pVCpu->hwaccm.s.cTLBFlushes, 2464 pCpu->uCurrentASID, pCpu->cTLBFlushes , pVCpu->hwaccm.s.fASIDState, pCpu->fASIDState));2461 pCpu->uCurrentASID, pCpu->cTLBFlushes)); 2465 2462 2466 2463 /** @todo We never set VMCPU_FF_TLB_SHOOTDOWN anywhere so this path should … … 2528 2525 */ 2529 2526 if ( pVCpu->hwaccm.s.idLastCpu != pCpu->idCpu 2530 || pVCpu->hwaccm.s.cTLBFlushes != pCpu->cTLBFlushes 2531 || pVCpu->hwaccm.s.fASIDState != pCpu->fASIDState) 2527 || pVCpu->hwaccm.s.cTLBFlushes != pCpu->cTLBFlushes) 2532 2528 { 2533 2529 pVCpu->hwaccm.s.fForceTLBFlush = true; … … 2542 2538 pVCpu->hwaccm.s.idLastCpu = pCpu->idCpu; 2543 2539 pVCpu->hwaccm.s.cTLBFlushes = pCpu->cTLBFlushes; 2544 pVCpu->hwaccm.s.fASIDState = pCpu->fASIDState;2545 2540 2546 2541 if (pVCpu->hwaccm.s.fForceTLBFlush) … … 2595 2590 */ 2596 2591 if ( pVCpu->hwaccm.s.idLastCpu != pCpu->idCpu 2597 || pVCpu->hwaccm.s.cTLBFlushes != pCpu->cTLBFlushes 2598 || pVCpu->hwaccm.s.fASIDState != pCpu->fASIDState) 2592 || pVCpu->hwaccm.s.cTLBFlushes != pCpu->cTLBFlushes) 2599 2593 { 2600 2594 /* Force a TLB flush on VM entry. */ … … 2625 2619 pVCpu->hwaccm.s.cTLBFlushes = pCpu->cTLBFlushes; 2626 2620 pVCpu->hwaccm.s.uCurrentASID = pCpu->uCurrentASID; 2627 pVCpu->hwaccm.s.fASIDState = pCpu->fASIDState;2628 2621 if (pCpu->fFlushASIDBeforeUse) 2629 2622 hmR0VmxFlushVPID(pVM, pVCpu, pVM->hwaccm.s.vmx.enmFlushVPID, 0 /* GCPtr */); … … 2632 2625 { 2633 2626 AssertMsg(pVCpu->hwaccm.s.uCurrentASID && pCpu->uCurrentASID, 2634 ("hwaccm->uCurrentASID=%lu hwaccm->cTLBFlushes=%lu cpu->uCurrentASID=%lu cpu->cTLBFlushes=%lu" 2635 "hwaccm->fASIDState=%d cpu->fASIDState=%d\n", 2627 ("hwaccm->uCurrentASID=%lu hwaccm->cTLBFlushes=%lu cpu->uCurrentASID=%lu cpu->cTLBFlushes=%lu\n", 2636 2628 pVCpu->hwaccm.s.uCurrentASID, pVCpu->hwaccm.s.cTLBFlushes, 2637 pCpu->uCurrentASID, pCpu->cTLBFlushes , pVCpu->hwaccm.s.fASIDState, pCpu->fASIDState));2629 pCpu->uCurrentASID, pCpu->cTLBFlushes)); 2638 2630 2639 2631 /** @todo We never set VMCPU_FF_TLB_SHOOTDOWN anywhere so this path should
Note:
See TracChangeset
for help on using the changeset viewer.