Changeset 8806 in vbox
- Timestamp:
- May 14, 2008 9:34:15 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30807
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/HWACCMInternal.h
r8155 r8806 210 210 /** Set if we don't have to flush the TLB on VM entry. */ 211 211 bool fResumeVM; 212 /** Set if erratum 170 affects the AMD cpu. */ 213 bool fForceTLBFlush; 212 214 213 215 /** R0 memory object for the VM control block (VMCB). */ -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r8155 r8806 142 142 /* Set all bits to intercept all MSR accesses. */ 143 143 ASMMemFill32(pVM->hwaccm.s.svm.pMSRBitmap, PAGE_SIZE*2, 0xffffffff); 144 145 /* Erratum 170 which requires a forced TLB flush for each world switch has been fixed in stepping 1 of the Brisbane core. 146 * Family = 0x0f 147 * Model[7:0] = {ExtModel[3:0],BaseModel[3:0]} = 0x68 or 0x6b 148 * Stepping >= 1 149 */ 150 uint32_t u32Dummy; 151 uint32_t u32Version, u32Family, u32Model, u32Stepping, u32ExtModel; 152 ASMCpuId(1, &u32Version, &u32Dummy, &u32Dummy, &u32Dummy); 153 u32Family = (u32Version >> 8) & 0x0f; 154 u32Model = (u32Version >> 4) & 0x0f; 155 u32ExtModel = (u32Version >> 16) & 0x0f; 156 u32Stepping = u32Version & 0xf; 157 if ( u32Family == 0xf 158 && (u32ExtModel == 0x6) 159 && (u32Model == 0x8 || u32Model == 0xb) 160 && u32Stepping == 0) 161 { 162 pVM->hwaccm.s.svm.fForceTLBFlush = true; 163 } 144 164 145 165 return VINF_SUCCESS; … … 736 756 STAM_PROFILE_ADV_START(&pVM->hwaccm.s.StatInGC, x); 737 757 738 /** Erratum #170 -> must force a TLB flush */739 /** @todo supposed to be fixed in future by AMD */740 fForceTLBFlush = true;741 742 758 if ( pVM->hwaccm.s.svm.fResumeVM == false 743 || fForceTLBFlush)759 || pVM->hwaccm.s.svm.fForceTLBFlush) 744 760 { 745 761 pVMCB->ctrl.TLBCtrl.n.u1TLBFlush = 1; 746 762 } 747 763 else 748 {749 764 pVMCB->ctrl.TLBCtrl.n.u1TLBFlush = 0; 750 } 765 751 766 /* In case we execute a goto ResumeExecution later on. */ 752 767 pVM->hwaccm.s.svm.fResumeVM = true;
Note:
See TracChangeset
for help on using the changeset viewer.