- Timestamp:
- Jun 21, 2013 12:48:38 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86647
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMR0.cpp
r46420 r46724 1378 1378 /* On first entry we'll sync everything. */ 1379 1379 for (VMCPUID i = 0; i < pVM->cCpus; i++) 1380 pVM->aCpus[i].hm.s.fContextUseFlags = HM_CHANGED_ALL;1380 pVM->aCpus[i].hm.s.fContextUseFlags = (HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST); 1381 1381 1382 1382 /* Enable VT-x or AMD-V if local init is required. */ -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r46719 r46724 6710 6710 6711 6711 /* Clear any unused and reserved bits. */ 6712 pVCpu->hm.s.fContextUseFlags &= ~HM_CHANGED_GUEST_CR2; 6712 pVCpu->hm.s.fContextUseFlags &= ~( HM_CHANGED_GUEST_CR2 6713 | HM_CHANGED_GUEST_MSR /* legacy */); 6713 6714 6714 6715 AssertMsg(!pVCpu->hm.s.fContextUseFlags, -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r46659 r46724 2811 2811 /** @todo we can do better than this */ 2812 2812 /* Not in the VINF_PGM_CHANGE_MODE though! */ 2813 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_ ALL;2813 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST; 2814 2814 } 2815 2815 -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r46420 r46724 4050 4050 * whole context to be done with it. 4051 4051 */ 4052 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_ ALL;4052 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST; 4053 4053 4054 4054 /* Only resume if successful. */ … … 5024 5024 /** @todo we can do better than this */ 5025 5025 /* Not in the VINF_PGM_CHANGE_MODE though! */ 5026 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_ ALL;5026 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST; 5027 5027 } 5028 5028 -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r46718 r46724 1667 1667 { 1668 1668 /* On first entry we'll sync everything. */ 1669 pVCpu->hm.s.fContextUseFlags = HM_CHANGED_ALL;1669 pVCpu->hm.s.fContextUseFlags = (HM_CHANGED_HOST_CONTEXT | HM_CHANGED_ALL_GUEST); 1670 1670 1671 1671 pVCpu->hm.s.vmx.u32CR0Mask = 0; -
trunk/src/VBox/VMM/include/HMInternal.h
r46711 r46724 81 81 * @{ 82 82 */ 83 #ifdef VBOX_WITH_OLD_VTX_CODE 84 # define HM_CHANGED_GUEST_FPU RT_BIT(0) 85 # define HM_CHANGED_GUEST_CR0 RT_BIT(1) 86 # define HM_CHANGED_GUEST_CR3 RT_BIT(2) 87 # define HM_CHANGED_GUEST_CR4 RT_BIT(3) 88 # define HM_CHANGED_GUEST_GDTR RT_BIT(4) 89 # define HM_CHANGED_GUEST_IDTR RT_BIT(5) 90 # define HM_CHANGED_GUEST_LDTR RT_BIT(6) 91 # define HM_CHANGED_GUEST_TR RT_BIT(7) 92 # define HM_CHANGED_GUEST_MSR RT_BIT(8) 93 # define HM_CHANGED_GUEST_SEGMENT_REGS RT_BIT(9) 94 # define HM_CHANGED_GUEST_DEBUG RT_BIT(10) 95 # define HM_CHANGED_HOST_CONTEXT RT_BIT(11) 96 # define HM_CHANGED_ALL_GUEST ( HM_CHANGED_GUEST_SEGMENT_REGS \ 97 | HM_CHANGED_GUEST_CR0 \ 98 | HM_CHANGED_GUEST_CR3 \ 99 | HM_CHANGED_GUEST_CR4 \ 100 | HM_CHANGED_GUEST_GDTR \ 101 | HM_CHANGED_GUEST_IDTR \ 102 | HM_CHANGED_GUEST_LDTR \ 103 | HM_CHANGED_GUEST_TR \ 104 | HM_CHANGED_GUEST_MSR \ 105 | HM_CHANGED_GUEST_DEBUG \ 106 | HM_CHANGED_GUEST_FPU) 107 #else 108 # define HM_CHANGED_GUEST_RIP RT_BIT(0) 109 # define HM_CHANGED_GUEST_RSP RT_BIT(1) 110 # define HM_CHANGED_GUEST_RFLAGS RT_BIT(2) 111 # define HM_CHANGED_GUEST_CR0 RT_BIT(3) 112 # define HM_CHANGED_GUEST_CR2 RT_BIT(4) 113 # define HM_CHANGED_GUEST_CR3 RT_BIT(5) 114 # define HM_CHANGED_GUEST_CR4 RT_BIT(6) 115 # define HM_CHANGED_GUEST_GDTR RT_BIT(7) 116 # define HM_CHANGED_GUEST_IDTR RT_BIT(8) 117 # define HM_CHANGED_GUEST_LDTR RT_BIT(9) 118 # define HM_CHANGED_GUEST_TR RT_BIT(10) 119 # define HM_CHANGED_GUEST_SEGMENT_REGS RT_BIT(11) 120 # define HM_CHANGED_GUEST_DEBUG RT_BIT(12) 121 # define HM_CHANGED_GUEST_SYSENTER_CS_MSR RT_BIT(13) 122 # define HM_CHANGED_GUEST_SYSENTER_EIP_MSR RT_BIT(14) 123 # define HM_CHANGED_GUEST_SYSENTER_ESP_MSR RT_BIT(15) 83 #define HM_CHANGED_GUEST_CR0 RT_BIT(0) 84 #define HM_CHANGED_GUEST_CR3 RT_BIT(1) 85 #define HM_CHANGED_GUEST_CR4 RT_BIT(2) 86 #define HM_CHANGED_GUEST_GDTR RT_BIT(3) 87 #define HM_CHANGED_GUEST_IDTR RT_BIT(4) 88 #define HM_CHANGED_GUEST_LDTR RT_BIT(5) 89 #define HM_CHANGED_GUEST_TR RT_BIT(6) 90 #define HM_CHANGED_GUEST_MSR RT_BIT(7) /* Unused in new VT-x, AMD-V code. */ 91 #define HM_CHANGED_GUEST_SEGMENT_REGS RT_BIT(8) 92 #define HM_CHANGED_GUEST_DEBUG RT_BIT(9) 93 #define HM_CHANGED_ALL_GUEST_BASE ( HM_CHANGED_GUEST_CR0 \ 94 | HM_CHANGED_GUEST_CR3 \ 95 | HM_CHANGED_GUEST_CR4 \ 96 | HM_CHANGED_GUEST_GDTR \ 97 | HM_CHANGED_GUEST_IDTR \ 98 | HM_CHANGED_GUEST_LDTR \ 99 | HM_CHANGED_GUEST_TR \ 100 | HM_CHANGED_GUEST_MSR \ 101 | HM_CHANGED_GUEST_SEGMENT_REGS \ 102 | HM_CHANGED_GUEST_DEBUG) 103 #define HM_CHANGED_ALL_GUEST HM_CHANGED_ALL_GUEST_BASE 104 105 /** New VT-x, AMD-V code uses extra flags for more fine-grained state 106 * tracking. */ 107 #if !defined(VBOX_WITH_OLD_VTX_CODE) || !defined(VBOX_WITH_OLD_AMDV_CODE) 108 # define HM_CHANGED_GUEST_RIP RT_BIT(10) 109 # define HM_CHANGED_GUEST_RSP RT_BIT(11) 110 # define HM_CHANGED_GUEST_RFLAGS RT_BIT(12) 111 # define HM_CHANGED_GUEST_CR2 RT_BIT(13) 112 # define HM_CHANGED_GUEST_SYSENTER_CS_MSR RT_BIT(14) 113 # define HM_CHANGED_GUEST_SYSENTER_EIP_MSR RT_BIT(15) 114 # define HM_CHANGED_GUEST_SYSENTER_ESP_MSR RT_BIT(16) 124 115 /* VT-x specific state. */ 125 # define HM_CHANGED_VMX_GUEST_AUTO_MSRS RT_BIT(1 6)126 # define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE RT_BIT(1 7)127 # define HM_CHANGED_VMX_GUEST_APIC_STATE RT_BIT(1 8)128 # define HM_CHANGED_VMX_ENTRY_CTLS RT_BIT( 19)129 # define HM_CHANGED_VMX_EXIT_CTLS RT_BIT(2 0)116 # define HM_CHANGED_VMX_GUEST_AUTO_MSRS RT_BIT(17) 117 # define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE RT_BIT(18) 118 # define HM_CHANGED_VMX_GUEST_APIC_STATE RT_BIT(19) 119 # define HM_CHANGED_VMX_ENTRY_CTLS RT_BIT(20) 120 # define HM_CHANGED_VMX_EXIT_CTLS RT_BIT(21) 130 121 /* AMD-V specific state. */ 131 # define HM_CHANGED_SVM_GUEST_APIC_STATE RT_BIT(16)132 122 # define HM_CHANGED_SVM_GUEST_EFER_MSR RT_BIT(17) 133 # define HM_CHANGED_SVM_RESERVED2 RT_BIT(18) 134 # define HM_CHANGED_SVM_RESERVED3 RT_BIT(19) 135 # define HM_CHANGED_SVM_RESERVED4 RT_BIT(20) 136 137 # define HM_CHANGED_HOST_CONTEXT RT_BIT(21) 138 # define HM_CHANGED_ALL_GUEST ( HM_CHANGED_GUEST_RIP \ 123 # define HM_CHANGED_SVM_GUEST_APIC_STATE RT_BIT(18) 124 # define HM_CHANGED_SVM_RESERVED1 RT_BIT(19) 125 # define HM_CHANGED_SVM_RESERVED2 RT_BIT(20) 126 # define HM_CHANGED_SVM_RESERVED3 RT_BIT(21) 127 128 # undef HM_CHANGED_ALL_GUEST 129 # define HM_CHANGED_ALL_GUEST ( HM_CHANGED_ALL_GUEST_BASE \ 130 | HM_CHANGED_GUEST_RIP \ 139 131 | HM_CHANGED_GUEST_RSP \ 140 132 | HM_CHANGED_GUEST_RFLAGS \ 141 | HM_CHANGED_GUEST_CR0 \142 133 | HM_CHANGED_GUEST_CR2 \ 143 | HM_CHANGED_GUEST_CR3 \144 | HM_CHANGED_GUEST_CR4 \145 | HM_CHANGED_GUEST_GDTR \146 | HM_CHANGED_GUEST_IDTR \147 | HM_CHANGED_GUEST_LDTR \148 | HM_CHANGED_GUEST_TR \149 | HM_CHANGED_GUEST_SEGMENT_REGS \150 | HM_CHANGED_GUEST_DEBUG \151 134 | HM_CHANGED_GUEST_SYSENTER_CS_MSR \ 152 135 | HM_CHANGED_GUEST_SYSENTER_EIP_MSR \ … … 159 142 #endif 160 143 161 #define HM_CHANGED_ ALL (HM_CHANGED_ALL_GUEST | HM_CHANGED_HOST_CONTEXT)144 #define HM_CHANGED_HOST_CONTEXT RT_BIT(22) 162 145 /** @} */ 163 146
Note:
See TracChangeset
for help on using the changeset viewer.