Changeset 45351 in vbox
- Timestamp:
- Apr 4, 2013 8:24:29 PM (11 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
-
VMMR0/HMVMXR0.cpp (modified) (8 diffs)
-
include/HMInternal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45349 r45351 2591 2591 * Guest FPU. 2592 2592 */ 2593 if ( (pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_CR0) 2594 || (pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_FPU)) 2593 if (pVCpu->hm.s.fContextUseFlags & HM_CHANGED_GUEST_CR0) 2595 2594 { 2596 2595 uint64_t u64GuestCR0 = pCtx->cr0; … … 2734 2733 AssertRCReturn(rc, rc); 2735 2734 2736 pVCpu->hm.s.fContextUseFlags &= ~ (HM_CHANGED_GUEST_CR0 | HM_CHANGED_GUEST_FPU);2735 pVCpu->hm.s.fContextUseFlags &= ~HM_CHANGED_GUEST_CR0; 2737 2736 } 2738 2737 2739 2738 /* 2740 2739 * Guest CR2. 2741 * It's always loaded latein the assembler code. Nothing to do here.2740 * It's always loaded in the assembler code. Nothing to do here. 2742 2741 */ 2743 pVCpu->hm.s.fContextUseFlags &= ~HM_CHANGED_GUEST_CR2;2744 2742 2745 2743 /* … … 6221 6219 LogFlowFunc(("pVM=%p pVCpu=%p\n", pVM, pVCpu)); 6222 6220 6223 /* For longjmp reentrants we need not load the guest state a ll over again. */6221 /* For longjmp reentrants we need not load the guest state again. */ 6224 6222 if (!pVCpu->hm.s.fContextUseFlags) 6225 6223 return VINF_SUCCESS; 6226 6224 6227 6225 /* Determine real-on-v86 mode. */ 6228 6226 pVCpu->hm.s.vmx.RealMode.fRealOnV86Active = false; … … 6232 6230 pVCpu->hm.s.vmx.RealMode.fRealOnV86Active = true; 6233 6231 } 6232 6233 Log(("LoadGuest flags=%#RX32\n", pVCpu->hm.s.fContextUseFlags)); 6234 6234 6235 6235 int rc = hmR0VmxLoadGuestEntryCtls(pVM, pVCpu, pCtx); … … 7522 7522 case 2: /* CR2 */ 7523 7523 Log(("CR2 write rc=%d\n", rc)); 7524 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR2;7525 7524 break; 7526 7525 case 3: /* CR3 */ … … 8183 8182 Assert(CPUMIsGuestFPUStateActive(pVCpu)); 8184 8183 8185 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_ FPU;8184 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR0; 8186 8185 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitShadowNM); 8187 8186 return VINF_SUCCESS; … … 8477 8476 { 8478 8477 pMixedCtx->cr2 = pVmxTransient->uExitQualification; 8479 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR2;8480 8478 rc = hmR0VmxInjectEventVmcs(pVM, pVCpu, pMixedCtx, 8481 8479 VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(pVmxTransient->uExitIntrInfo), … … 8561 8559 TRPMResetTrap(pVCpu); 8562 8560 pMixedCtx->cr2 = pVmxTransient->uExitQualification; 8563 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR2;8564 8561 rc = hmR0VmxInjectEventVmcs(pVM, pVCpu, pMixedCtx, 8565 8562 VMX_VMCS_CTRL_ENTRY_IRQ_INFO_FROM_EXIT_INT_INFO(pVmxTransient->uExitIntrInfo), -
trunk/src/VBox/VMM/include/HMInternal.h
r45349 r45351 102 102 # define HM_CHANGED_GUEST_RSP RT_BIT(1) 103 103 # define HM_CHANGED_GUEST_RFLAGS RT_BIT(2) 104 # define HM_CHANGED_GUEST_FPU RT_BIT(3) 105 # define HM_CHANGED_GUEST_CR0 RT_BIT(4) 106 # define HM_CHANGED_GUEST_CR2 RT_BIT(5) 107 # define HM_CHANGED_GUEST_CR3 RT_BIT(6) 108 # define HM_CHANGED_GUEST_CR4 RT_BIT(7) 109 # define HM_CHANGED_GUEST_GDTR RT_BIT(8) 110 # define HM_CHANGED_GUEST_IDTR RT_BIT(9) 111 # define HM_CHANGED_GUEST_LDTR RT_BIT(10) 112 # define HM_CHANGED_GUEST_TR RT_BIT(11) 113 # define HM_CHANGED_GUEST_SEGMENT_REGS RT_BIT(12) 114 # define HM_CHANGED_GUEST_DEBUG RT_BIT(13) 115 # define HM_CHANGED_GUEST_FS_BASE_MSR RT_BIT(14) 116 # define HM_CHANGED_GUEST_GS_BASE_MSR RT_BIT(15) 117 # define HM_CHANGED_GUEST_SYSENTER_CS_MSR RT_BIT(16) 118 # define HM_CHANGED_GUEST_SYSENTER_EIP_MSR RT_BIT(17) 119 # define HM_CHANGED_GUEST_SYSENTER_ESP_MSR RT_BIT(18) 120 # define HM_CHANGED_GUEST_INTR_STATE RT_BIT(19) 121 # define HM_CHANGED_VMX_GUEST_AUTO_MSRS RT_BIT(20) 122 # define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE RT_BIT(21) 123 # define HM_CHANGED_VMX_GUEST_APIC_STATE RT_BIT(22) 124 # define HM_CHANGED_VMX_ENTRY_CTLS RT_BIT(23) 125 # define HM_CHANGED_VMX_EXIT_CTLS RT_BIT(24) 126 127 # define HM_CHANGED_HOST_CONTEXT RT_BIT(25) 104 # define HM_CHANGED_GUEST_CR0 RT_BIT(3) 105 # define HM_CHANGED_GUEST_CR3 RT_BIT(4) 106 # define HM_CHANGED_GUEST_CR4 RT_BIT(5) 107 # define HM_CHANGED_GUEST_GDTR RT_BIT(6) 108 # define HM_CHANGED_GUEST_IDTR RT_BIT(7) 109 # define HM_CHANGED_GUEST_LDTR RT_BIT(8) 110 # define HM_CHANGED_GUEST_TR RT_BIT(9) 111 # define HM_CHANGED_GUEST_SEGMENT_REGS RT_BIT(10) 112 # define HM_CHANGED_GUEST_DEBUG RT_BIT(11) 113 # define HM_CHANGED_GUEST_FS_BASE_MSR RT_BIT(12) 114 # define HM_CHANGED_GUEST_GS_BASE_MSR RT_BIT(13) 115 # define HM_CHANGED_GUEST_SYSENTER_CS_MSR RT_BIT(14) 116 # define HM_CHANGED_GUEST_SYSENTER_EIP_MSR RT_BIT(15) 117 # define HM_CHANGED_GUEST_SYSENTER_ESP_MSR RT_BIT(16) 118 # define HM_CHANGED_GUEST_INTR_STATE RT_BIT(17) 119 # define HM_CHANGED_VMX_GUEST_AUTO_MSRS RT_BIT(18) 120 # define HM_CHANGED_VMX_GUEST_ACTIVITY_STATE RT_BIT(19) 121 # define HM_CHANGED_VMX_GUEST_APIC_STATE RT_BIT(20) 122 # define HM_CHANGED_VMX_ENTRY_CTLS RT_BIT(21) 123 # define HM_CHANGED_VMX_EXIT_CTLS RT_BIT(22) 124 125 # define HM_CHANGED_HOST_CONTEXT RT_BIT(23) 128 126 129 127 # define HM_CHANGED_ALL_GUEST ( HM_CHANGED_GUEST_RIP \ 130 128 | HM_CHANGED_GUEST_RSP \ 131 129 | HM_CHANGED_GUEST_RFLAGS \ 132 | HM_CHANGED_GUEST_FPU \133 130 | HM_CHANGED_GUEST_CR0 \ 134 | HM_CHANGED_GUEST_CR2 \135 131 | HM_CHANGED_GUEST_CR3 \ 136 132 | HM_CHANGED_GUEST_CR4 \
Note:
See TracChangeset
for help on using the changeset viewer.

