Changeset 45823 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 29, 2013 3:55:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45820 r45823 1840 1840 1841 1841 /* Set VMCS link pointer. Reserved for future use, must be -1. Intel spec. 24.4 "Guest-State Area". */ 1842 rc |= VMXWriteVmcs64(VMX_VMCS64_GUEST_VMCS_LINK_PTR_FULL, 0xffffffffffffffffULL);1842 rc |= VMXWriteVmcs64(VMX_VMCS64_GUEST_VMCS_LINK_PTR_FULL, UINT64_C(0xffffffffffffffff)); 1843 1843 1844 1844 /* Setup debug controls */ … … 2866 2866 /* Validate. See Intel spec. 28.2.2 "EPT Translation Mechanism" and 24.6.11 "Extended-Page-Table Pointer (EPTP)" */ 2867 2867 Assert(pVCpu->hm.s.vmx.HCPhysEPTP); 2868 Assert(!(pVCpu->hm.s.vmx.HCPhysEPTP & 0xfff0000000000000ULL));2868 Assert(!(pVCpu->hm.s.vmx.HCPhysEPTP & UINT64_C(0xfff0000000000000))); 2869 2869 Assert(!(pVCpu->hm.s.vmx.HCPhysEPTP & 0xfff)); 2870 2870 2871 2871 /* VMX_EPT_MEMTYPE_WB support is already checked in hmR0VmxSetupTaggedTlb(). */ 2872 pVCpu->hm.s.vmx.HCPhysEPTP |= VMX_EPT_MEMTYPE_WB2873 | (VMX_EPT_PAGE_WALK_LENGTH_DEFAULT << VMX_EPT_PAGE_WALK_LENGTH_SHIFT);2872 pVCpu->hm.s.vmx.HCPhysEPTP |= VMX_EPT_MEMTYPE_WB 2873 | (VMX_EPT_PAGE_WALK_LENGTH_DEFAULT << VMX_EPT_PAGE_WALK_LENGTH_SHIFT); 2874 2874 2875 2875 /* Validate. See Intel spec. 26.2.1 "Checks on VMX Controls" */ … … 3051 3051 if (pVCpu->hm.s.vmx.u32EntryCtls & VMX_VMCS_CTRL_ENTRY_CONTROLS_LOAD_DEBUG) 3052 3052 { 3053 Assert( (pMixedCtx->dr[7] & 0xffffffff00000000ULL) == 0);/* upper 32 bits are reserved (MBZ). */3053 Assert(!(pMixedCtx->dr[7] >> 32)); /* upper 32 bits are reserved (MBZ). */ 3054 3054 /* Validate. Intel spec. 17.2 "Debug Registers", recompiler paranoia checks. */ 3055 3055 Assert((pMixedCtx->dr[7] & 0xd800) == 0); /* bits 15, 14, 12, 11 are reserved (MBZ). */ … … 3495 3495 AssertRCReturn(rc, rc); 3496 3496 3497 Assert(!(pMixedCtx->gdtr.cbGdt & 0xffff0000ULL)); /* Bits 31:16 MBZ. */3497 Assert(!(pMixedCtx->gdtr.cbGdt & UINT64_C(0xffff0000))); /* Bits 31:16 MBZ. */ 3498 3498 Log(("Load: VMX_VMCS_GUEST_GDTR_BASE=%#RX64\n", pMixedCtx->gdtr.pGdt)); 3499 3499 pVCpu->hm.s.fContextUseFlags &= ~HM_CHANGED_GUEST_GDTR; … … 3546 3546 AssertRCReturn(rc, rc); 3547 3547 3548 Assert(!(pMixedCtx->idtr.cbIdt & 0xffff0000ULL)); /* Bits 31:16 MBZ. */3548 Assert(!(pMixedCtx->idtr.cbIdt & UINT64_C(0xffff0000))); /* Bits 31:16 MBZ. */ 3549 3549 Log(("Load: VMX_VMCS_GUEST_IDTR_BASE=%#RX64\n", pMixedCtx->idtr.pIdt)); 3550 3550 pVCpu->hm.s.fContextUseFlags &= ~HM_CHANGED_GUEST_IDTR; … … 5179 5179 if (!(pVCpu->hm.s.vmx.fUpdatedGuestState & HMVMX_UPDATED_GUEST_SEGMENT_REGS)) 5180 5180 { 5181 rc = hmR0VmxSaveGuestCR0(pVCpu, pMixedCtx);5181 rc = hmR0VmxSaveGuestCR0(pVCpu, pMixedCtx); 5182 5182 rc |= VMXLOCAL_READ_SEG(CS, cs); 5183 5183 rc |= VMXLOCAL_READ_SEG(SS, ss); … … 5636 5636 STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatExitXcptNmi, y3); 5637 5637 STAM_COUNTER_INC(&pVCpu->hm.s.StatSwitchLongJmpToR3); 5638 VMCPU_CMPXCHG_STATE(pVCpu, VMCPUSTATE_STARTED_HM, VMCPUSTATE_STARTED_EXEC); 5638 5639 } 5639 5640 … … 6015 6016 || uVector == X86_XCPT_OF) 6016 6017 { 6017 u32IntrInfo 6018 u32IntrInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_XCPT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 6018 6019 } 6019 6020 else 6020 u32IntrInfo 6021 u32IntrInfo |= (VMX_EXIT_INTERRUPTION_INFO_TYPE_SW_INT << VMX_EXIT_INTERRUPTION_INFO_TYPE_SHIFT); 6021 6022 STAM_COUNTER_INC(&pVCpu->hm.s.StatIntInject); 6022 6023 hmR0VmxSetPendingEvent(pVCpu, u32IntrInfo, cbInstr, 0 /* u32ErrCode */, 0 /* GCPtrFaultAddress */); … … 6472 6473 return VINF_EM_RAW_INTERRUPT; 6473 6474 } 6475 VMCPU_ASSERT_STATE(pVCpu, VMCPUSTATE_STARTED_HM); 6474 6476 VMCPU_SET_STATE(pVCpu, VMCPUSTATE_STARTED_EXEC); 6475 6477 #endif … … 7417 7419 VMX_VALIDATE_EXIT_HANDLER_PARAMS(); 7418 7420 7419 /* If we're saving the preemption-timer value on every VM-exit & we've reached zero, reset it up on next VM-entry. */ 7420 if (pVCpu->hm.s.vmx.u32ExitCtls & VMX_VMCS_CTRL_EXIT_CONTROLS_SAVE_VMX_PREEMPT_TIMER) 7421 pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = true; 7421 /* If the preemption-timer has expired, reinitialize the preemption timer on next VM-entry. */ 7422 pVmxTransient->fUpdateTscOffsettingAndPreemptTimer = true; 7422 7423 7423 7424 /* If there are any timer events pending, fall back to ring-3, otherwise resume guest execution. */ … … 8369 8370 /* Successfully synced our shadow page tables or emulation MMIO instruction. */ 8370 8371 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitReasonNpf); 8371 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_RIP | HM_CHANGED_GUEST_RSP | HM_CHANGED_GUEST_RFLAGS8372 | HM_CHANGED_VMX_GUEST_APIC_STATE;8372 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_RIP | HM_CHANGED_GUEST_RSP | HM_CHANGED_GUEST_RFLAGS 8373 | HM_CHANGED_VMX_GUEST_APIC_STATE; 8373 8374 return VINF_SUCCESS; 8374 8375 }
Note:
See TracChangeset
for help on using the changeset viewer.