Changeset 42161 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jul 16, 2012 12:12:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r42156 r42161 1778 1778 val = (val & ~0xF) | X86_SEL_TYPE_SYS_386_TSS_BUSY; 1779 1779 } 1780 AssertMsg((val & 0xf) == X86_SEL_TYPE_SYS_386_TSS_BUSY || (val & 0xf) == X86_SEL_TYPE_SYS_286_TSS_BUSY, ("%#x\n", val)); 1780 AssertMsg((val & 0xf) == X86_SEL_TYPE_SYS_386_TSS_BUSY || (val & 0xf) == X86_SEL_TYPE_SYS_286_TSS_BUSY, 1781 ("%#x\n", val)); 1781 1782 } 1782 1783 rc |= VMXWriteVMCS(VMX_VMCS32_GUEST_TR_ACCESS_RIGHTS, val); … … 1836 1837 val |= X86_CR0_NE; /* always turn on the native mechanism to report FPU errors (old style uses interrupts) */ 1837 1838 } 1838 /* Note: protected mode & paging are always enabled; we use them for emulating real and protected mode without paging too. */1839 /* Protected mode & paging are always enabled; we use them for emulating real and protected mode without paging too. */ 1839 1840 if (!pVM->hwaccm.s.vmx.fUnrestrictedGuest) 1840 1841 val |= X86_CR0_PE | X86_CR0_PG; … … 2710 2711 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_TLB_SHOOTDOWN); 2711 2712 2712 AssertMsg(pVCpu->hwaccm.s.cTLBFlushes == pCpu->cTLBFlushes, ("Flush count mismatch for cpu %d (%x vs %x)\n", pCpu->idCpu, pVCpu->hwaccm.s.cTLBFlushes, pCpu->cTLBFlushes)); 2713 AssertMsg(pCpu->uCurrentASID >= 1 && pCpu->uCurrentASID < pVM->hwaccm.s.uMaxASID, ("cpu%d uCurrentASID = %x\n", pCpu->idCpu, pCpu->uCurrentASID)); 2714 AssertMsg(pVCpu->hwaccm.s.uCurrentASID >= 1 && pVCpu->hwaccm.s.uCurrentASID < pVM->hwaccm.s.uMaxASID, ("cpu%d VM uCurrentASID = %x\n", pCpu->idCpu, pVCpu->hwaccm.s.uCurrentASID)); 2713 AssertMsg(pVCpu->hwaccm.s.cTLBFlushes == pCpu->cTLBFlushes, 2714 ("Flush count mismatch for cpu %d (%x vs %x)\n", pCpu->idCpu, pVCpu->hwaccm.s.cTLBFlushes, pCpu->cTLBFlushes)); 2715 AssertMsg(pCpu->uCurrentASID >= 1 && pCpu->uCurrentASID < pVM->hwaccm.s.uMaxASID, 2716 ("cpu%d uCurrentASID = %x\n", pCpu->idCpu, pCpu->uCurrentASID)); 2717 AssertMsg(pVCpu->hwaccm.s.uCurrentASID >= 1 && pVCpu->hwaccm.s.uCurrentASID < pVM->hwaccm.s.uMaxASID, 2718 ("cpu%d VM uCurrentASID = %x\n", pCpu->idCpu, pVCpu->hwaccm.s.uCurrentASID)); 2715 2719 2716 2720 int rc = VMXWriteVMCS(VMX_VMCS16_GUEST_FIELD_VPID, pVCpu->hwaccm.s.uCurrentASID); … … 2761 2765 #endif 2762 2766 2763 Assert(!(pVM->hwaccm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC) || (pVCpu->hwaccm.s.vmx.pbVAPIC && pVM->hwaccm.s.vmx.pAPIC)); 2767 Assert(!(pVM->hwaccm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC) 2768 || (pVCpu->hwaccm.s.vmx.pbVAPIC && pVM->hwaccm.s.vmx.pAPIC)); 2764 2769 2765 2770 /* … … 2767 2772 */ 2768 2773 if ( CPUMIsGuestInLongModeEx(pCtx) 2769 || ( ((pVM->hwaccm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC) || pVM->hwaccm.s.fTRPPatchingAllowed) 2774 || ( (( pVM->hwaccm.s.vmx.msr.vmx_proc_ctls2.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC2_VIRT_APIC) 2775 || pVM->hwaccm.s.fTRPPatchingAllowed) 2770 2776 && pVM->hwaccm.s.fHasIoApic) 2771 2777 ) … … 3018 3024 * -> We don't need to be explicitely notified. There are enough world switches for detecting pending interrupts. 3019 3025 */ 3020 rc = VMXWriteVMCS(VMX_VMCS_CTRL_TPR_THRESHOLD, (fPending) ? (u8LastTPR >> 4) : 0); /* cr8 bits 3-0 correspond to bits 7-4 of the task priority mmio register. */ 3026 3027 /* cr8 bits 3-0 correspond to bits 7-4 of the task priority mmio register. */ 3028 rc = VMXWriteVMCS(VMX_VMCS_CTRL_TPR_THRESHOLD, (fPending) ? (u8LastTPR >> 4) : 0); 3021 3029 AssertRC(VBOXSTRICTRC_VAL(rc)); 3022 3030 … … 3049 3057 { 3050 3058 PHMGLOBLCPUINFO pCpu = HWACCMR0GetCurrentCpu(); 3051 if ( pVCpu->hwaccm.s.idLastCpu != pCpu->idCpu 3052 || pVCpu->hwaccm.s.cTLBFlushes != pCpu->cTLBFlushes) 3053 { 3054 if (pVCpu->hwaccm.s.idLastCpu != pCpu->idCpu) 3055 LogFlow(("Force TLB flush due to rescheduling to a different cpu (%d vs %d)\n", pVCpu->hwaccm.s.idLastCpu, pCpu->idCpu)); 3056 else 3057 LogFlow(("Force TLB flush due to changed TLB flush count (%x vs %x)\n", pVCpu->hwaccm.s.cTLBFlushes, pCpu->cTLBFlushes)); 3059 if (pVCpu->hwaccm.s.idLastCpu != pCpu->idCpu) 3060 { 3061 LogFlow(("Force TLB flush due to rescheduling to a different cpu (%d vs %d)\n", pVCpu->hwaccm.s.idLastCpu, 3062 pCpu->idCpu)); 3063 } 3064 else if (pVCpu->hwaccm.s.cTLBFlushes != pCpu->cTLBFlushes) 3065 { 3066 LogFlow(("Force TLB flush due to changed TLB flush count (%x vs %x)\n", pVCpu->hwaccm.s.cTLBFlushes, 3067 pCpu->cTLBFlushes)); 3058 3068 } 3059 3069 else if (VMCPU_FF_ISSET(pVCpu, VMCPU_FF_TLB_FLUSH)) … … 3222 3232 #endif 3223 3233 3224 AssertMsg(!pVCpu->hwaccm.s.vmx.VMCSCache.Write.cValidEntries, ("pVCpu->hwaccm.s.vmx.VMCSCache.Write.cValidEntries=%d\n", pVCpu->hwaccm.s.vmx.VMCSCache.Write.cValidEntries)); 3234 AssertMsg(!pVCpu->hwaccm.s.vmx.VMCSCache.Write.cValidEntries, ("pVCpu->hwaccm.s.vmx.VMCSCache.Write.cValidEntries=%d\n", 3235 pVCpu->hwaccm.s.vmx.VMCSCache.Write.cValidEntries)); 3225 3236 3226 3237 /* In case we execute a goto ResumeExecution later on. */ … … 3882 3893 rc = VERR_EM_INTERPRETER; 3883 3894 3884 AssertMsg(rc == VERR_EM_INTERPRETER || rc == VINF_PGM_CHANGE_MODE || rc == VINF_EM_HALT, ("Unexpected rc=%Rrc\n", VBOXSTRICTRC_VAL(rc))); 3895 AssertMsg(rc == VERR_EM_INTERPRETER || rc == VINF_PGM_CHANGE_MODE || rc == VINF_EM_HALT, 3896 ("Unexpected rc=%Rrc\n", VBOXSTRICTRC_VAL(rc))); 3885 3897 break; 3886 3898 } … … 3893 3905 case X86_XCPT_NP: /* Segment not present exception. */ 3894 3906 { 3895 switch (vector)3907 switch (vector) 3896 3908 { 3897 3909 case X86_XCPT_DE:
Note:
See TracChangeset
for help on using the changeset viewer.