儲存庫 vbox 的更動 12090
- 時間撮記:
- 2008-9-4 下午12:51:46 (16 年 以前)
- 位置:
- trunk/src/VBox/VMM
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/HWACCMInternal.h
r12061 r12090 375 375 /** Currenty shadow paging mode. */ 376 376 PGMMODE enmShadowMode; 377 378 379 #ifdef VBOX_SAVE_HOST_DEBUG_REGISTERS 380 struct 381 { 382 /* Saved host debug registers. */ 383 uint64_t dr0, dr1, dr2, dr3, dr6, dr7; 384 bool fHostDR7Saved; 385 } savedhoststate; 386 #endif 377 387 378 388 STAMPROFILEADV StatEntry; -
trunk/src/VBox/VMM/VMMR0/HWACCMR0.cpp
r11311 r12090 744 744 CPUMDeactivateGuestFPUState(pVM); 745 745 746 #ifdef VBOX_WITH_DEBUG_REGISTER_SUPPORT 747 /* 748 * Check if host debug registers are armed. All context switches set DR7 back to 0x400. 749 */ 750 uint64_t u64DR7 = ASMGetDR7(); 751 if (u32DR7 & X86_DR7_ENABLED_MASK) 752 { 753 pVM->hwaccm.s.savedhoststate.dr7 = u64DR7; 754 pVM->hwaccm.s.savedhoststate.fHostDR7Saved = true; 755 } 756 else 757 pVM->hwaccm.s.savedhoststate.fHostDR7Saved = false; 758 #endif 759 746 760 /* Always reload the host context and the guest's CR0 register. (!!!!) */ 747 761 pVM->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_CR0 | HWACCM_CHANGED_HOST_CONTEXT; … … 791 805 pVM->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_CR0; 792 806 } 807 808 #ifdef VBOX_WITH_DEBUG_REGISTER_SUPPORT 809 if (pVM->hwaccm.s.savedhoststate.fHostDR7Saved) 810 { 811 ASMSetDR7(pVM->hwaccm.s.savedhoststate.dr7); 812 pVM->hwaccm.s.savedhoststate.fHostDR7Saved = false; 813 } 814 #endif 793 815 794 816 return HWACCMR0Globals.pfnLeaveSession(pVM); -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r12077 r12090 1169 1169 pCtx->SysEnter.esp = pVMCB->guest.u64SysEnterESP; 1170 1170 1171 /* Remaining guest CPU context: TR, IDTR, GDTR, LDTR; must sync everything otherwise we can get out of sync when jumping to ring 3. */ 1172 SVM_READ_SELREG(LDTR, ldtr); 1173 SVM_READ_SELREG(TR, tr); 1174 1175 pCtx->gdtr.cbGdt = pVMCB->guest.GDTR.u32Limit; 1176 pCtx->gdtr.pGdt = pVMCB->guest.GDTR.u64Base; 1177 1178 pCtx->idtr.cbIdt = pVMCB->guest.IDTR.u32Limit; 1179 pCtx->idtr.pIdt = pVMCB->guest.IDTR.u64Base; 1180 1171 1181 /* Note: no reason to sync back the CRx and DRx registers. They can't be changed by the guest. */ 1172 1182 /* Note: only in the nested paging case can CR3 & CR4 be changed by the guest. */ … … 1656 1666 { 1657 1667 /* EIP has been updated already. */ 1668 pVM->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_DEBUG; 1658 1669 1659 1670 /* Only resume if successful. */ … … 1880 1891 1881 1892 end: 1882 if (fGuestStateSynced)1883 {1884 /* Remaining guest CPU context: TR, IDTR, GDTR, LDTR. */1885 SVM_READ_SELREG(LDTR, ldtr);1886 SVM_READ_SELREG(TR, tr);1887 1888 pCtx->gdtr.cbGdt = pVMCB->guest.GDTR.u32Limit;1889 pCtx->gdtr.pGdt = pVMCB->guest.GDTR.u64Base;1890 1891 pCtx->idtr.cbIdt = pVMCB->guest.IDTR.u32Limit;1892 pCtx->idtr.pIdt = pVMCB->guest.IDTR.u64Base;1893 }1894 1893 1895 1894 /* Signal changes for the recompiler. */ -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r12079 r12090 1145 1145 #endif 1146 1146 1147 #if 01148 /*1149 * Check if debug registers are armed.1150 */1151 uint32_t u32DR7 = ASMGetDR7();1152 if (u32DR7 & X86_DR7_ENABLED_MASK)1153 {1154 pVM->cpum.s.fUseFlags |= CPUM_USE_DEBUG_REGS_HOST;1155 }1156 else1157 pVM->cpum.s.fUseFlags &= ~CPUM_USE_DEBUG_REGS_HOST;1158 #endif1159 1160 1147 /* We can jump to this point to resume execution after determining that a VM-exit is innocent. 1161 1148 */ … … 1542 1529 VMXReadVMCS(VMX_VMCS_GUEST_SYSENTER_ESP, &val); 1543 1530 pCtx->SysEnter.esp = val; 1531 1532 /* Misc. registers; must sync everything otherwise we can get out of sync when jumping to ring 3. */ 1533 VMX_READ_SELREG(LDTR, ldtr); 1534 VMX_READ_SELREG(TR, tr); 1535 1536 VMXReadVMCS(VMX_VMCS_GUEST_GDTR_LIMIT, &val); 1537 pCtx->gdtr.cbGdt = val; 1538 VMXReadVMCS(VMX_VMCS_GUEST_GDTR_BASE, &val); 1539 pCtx->gdtr.pGdt = val; 1540 1541 VMXReadVMCS(VMX_VMCS_GUEST_IDTR_LIMIT, &val); 1542 pCtx->idtr.cbIdt = val; 1543 VMXReadVMCS(VMX_VMCS_GUEST_IDTR_BASE, &val); 1544 pCtx->idtr.pIdt = val; 1544 1545 1545 1546 /** @note NOW IT'S SAFE FOR LOGGING! */ … … 1950 1951 VMX_EXIT_QUALIFICATION_DRX_REGISTER(exitQualification), 1951 1952 VMX_EXIT_QUALIFICATION_DRX_GENREG(exitQualification)); 1953 pVM->hwaccm.s.fContextUseFlags |= HWACCM_CHANGED_GUEST_DEBUG; 1952 1954 Log2(("DR7=%08x\n", pCtx->dr7)); 1953 1955 } … … 2221 2223 } 2222 2224 end: 2223 if (fGuestStateSynced)2224 {2225 /* Remaining guest CPU context: TR, IDTR, GDTR, LDTR. */2226 VMX_READ_SELREG(LDTR, ldtr);2227 VMX_READ_SELREG(TR, tr);2228 2229 VMXReadVMCS(VMX_VMCS_GUEST_GDTR_LIMIT, &val);2230 pCtx->gdtr.cbGdt = val;2231 VMXReadVMCS(VMX_VMCS_GUEST_GDTR_BASE, &val);2232 pCtx->gdtr.pGdt = val;2233 2234 VMXReadVMCS(VMX_VMCS_GUEST_IDTR_LIMIT, &val);2235 pCtx->idtr.cbIdt = val;2236 VMXReadVMCS(VMX_VMCS_GUEST_IDTR_BASE, &val);2237 pCtx->idtr.pIdt = val;2238 }2239 2225 2240 2226 /* Signal changes for the recompiler. */
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器