Changeset 47652 in vbox for trunk/src/VBox/VMM/include/HMInternal.h
- Timestamp:
- Aug 9, 2013 2:56:17 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/HMInternal.h
r47619 r47652 38 38 #endif 39 39 40 #ifdef VBOX_WITH_OLD_VTX_CODE 41 # define VMX_USE_CACHED_VMCS_ACCESSES 42 #elif HC_ARCH_BITS == 32 && defined(VBOX_ENABLE_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 40 #if HC_ARCH_BITS == 32 && defined(VBOX_ENABLE_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 43 41 # define VMX_USE_CACHED_VMCS_ACCESSES 44 42 #endif … … 88 86 #define HM_CHANGED_GUEST_LDTR RT_BIT(5) 89 87 #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) 88 #define HM_CHANGED_GUEST_SEGMENT_REGS RT_BIT(7) 89 #define HM_CHANGED_GUEST_DEBUG RT_BIT(8) 90 # define HM_CHANGED_GUEST_RIP RT_BIT(9) 91 # define HM_CHANGED_GUEST_RSP RT_BIT(10) 92 # define HM_CHANGED_GUEST_RFLAGS RT_BIT(11) 93 # define HM_CHANGED_GUEST_CR2 RT_BIT(12) 94 # define HM_CHANGED_GUEST_SYSENTER_CS_MSR RT_BIT(13) 95 # define HM_CHANGED_GUEST_SYSENTER_EIP_MSR RT_BIT(14) 96 # define HM_CHANGED_GUEST_SYSENTER_ESP_MSR RT_BIT(15) 115 97 /* VT-x specific state. */ 116 # define HM_CHANGED_VMX_GUEST_AUTO_MSRS RT_BIT(1 7)117 # define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE RT_BIT(1 8)118 # define HM_CHANGED_VMX_GUEST_APIC_STATE RT_BIT(1 9)119 # define HM_CHANGED_VMX_ENTRY_CTLS RT_BIT( 20)120 # define HM_CHANGED_VMX_EXIT_CTLS RT_BIT(2 1)98 # define HM_CHANGED_VMX_GUEST_AUTO_MSRS RT_BIT(16) 99 # define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE RT_BIT(17) 100 # define HM_CHANGED_VMX_GUEST_APIC_STATE RT_BIT(18) 101 # define HM_CHANGED_VMX_ENTRY_CTLS RT_BIT(19) 102 # define HM_CHANGED_VMX_EXIT_CTLS RT_BIT(20) 121 103 /* AMD-V specific state. */ 122 # define HM_CHANGED_SVM_GUEST_EFER_MSR RT_BIT(17) 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 \ 104 # define HM_CHANGED_SVM_GUEST_EFER_MSR RT_BIT(16) 105 # define HM_CHANGED_SVM_GUEST_APIC_STATE RT_BIT(17) 106 # define HM_CHANGED_SVM_RESERVED1 RT_BIT(18) 107 # define HM_CHANGED_SVM_RESERVED2 RT_BIT(19) 108 # define HM_CHANGED_SVM_RESERVED3 RT_BIT(20) 109 110 # define HM_CHANGED_ALL_GUEST ( HM_CHANGED_GUEST_CR0 \ 111 | HM_CHANGED_GUEST_CR3 \ 112 | HM_CHANGED_GUEST_CR4 \ 113 | HM_CHANGED_GUEST_GDTR \ 114 | HM_CHANGED_GUEST_IDTR \ 115 | HM_CHANGED_GUEST_LDTR \ 116 | HM_CHANGED_GUEST_TR \ 117 | HM_CHANGED_GUEST_SEGMENT_REGS \ 118 | HM_CHANGED_GUEST_DEBUG \ 130 119 | HM_CHANGED_GUEST_RIP \ 131 120 | HM_CHANGED_GUEST_RSP \ … … 140 129 | HM_CHANGED_VMX_ENTRY_CTLS \ 141 130 | HM_CHANGED_VMX_EXIT_CTLS) 142 #endif 143 144 #define HM_CHANGED_HOST_CONTEXT RT_BIT(22) 131 132 #define HM_CHANGED_HOST_CONTEXT RT_BIT(21) 145 133 /** @} */ 146 134 … … 355 343 #endif 356 344 357 #ifndef VBOX_WITH_OLD_VTX_CODE 345 /** Internal Id of which flush-handler to use for tagged-TLB entries. */ 358 346 unsigned uFlushTaggedTlb; 359 #else360 /** Ring 0 handlers for VT-x. */361 DECLR0CALLBACKMEMBER(void, pfnFlushTaggedTlb, (PVM pVM, PVMCPU pVCpu));362 #endif363 347 364 348 #if HC_ARCH_BITS == 32 && defined(VBOX_ENABLE_64_BITS_GUESTS) … … 665 649 } LastError; 666 650 667 #ifdef VBOX_WITH_OLD_VTX_CODE668 /** The last seen guest paging mode (by VT-x). */669 PGMMODE enmLastSeenGuestMode;670 /** Current guest paging mode (as seen by HMR3PagingModeChanged). */671 PGMMODE enmCurrGuestMode;672 /** Previous guest paging mode (as seen by HMR3PagingModeChanged). */673 PGMMODE enmPrevGuestMode;674 #else675 651 /** Which host-state bits to restore before being preempted. */ 676 652 uint32_t fRestoreHostFlags; … … 679 655 /** Set if guest was executing in real mode (extra checks). */ 680 656 bool fWasInRealMode; 681 #endif682 657 } vmx; 683 658
Note:
See TracChangeset
for help on using the changeset viewer.