Changeset 48360 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Sep 6, 2013 2:29:56 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r48347 r48360 4060 4060 #if HC_ARCH_BITS == 32 && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 4061 4061 /* 32-bit host. We need to switch to 64-bit before running the 64-bit guest. */ 4062 pVCpu->hm.s.vmx.pfnStartVM = VMXR0SwitcherStartVM64; 4062 if (pVCpu->hm.s.vmx.pfnStartVM != VMXR0SwitcherStartVM64) 4063 { 4064 pVCpu->hm.s.vmx.pfnStartVM = VMXR0SwitcherStartVM64; 4065 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_VMX_EXIT_CTLS | HM_CHANGED_VMX_ENTRY_CTLS; 4066 } 4063 4067 #else 4064 4068 /* 64-bit host or hybrid host. */ … … 4073 4077 { 4074 4078 pVCpu->hm.s.vmx.pfnStartVM = VMXR0StartVM32; 4075 /** @todo r=bird: Don't we need to set up the host resume (after 4076 * vmlaunch/vmresume) state here?? I'm forcing a trip to ring-3 now 4077 * in the hope that it will prevent crashing the host. A better 4078 * fix should be found as the guest may be going back and forth 4079 * between 16/32-bit and long mode frequently at times. */ 4080 VMCPU_FF_SET(pVCpu, VMCPU_FF_TO_R3); 4079 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_HOST_CONTEXT | HM_CHANGED_VMX_EXIT_CTLS | HM_CHANGED_VMX_ENTRY_CTLS; 4081 4080 } 4082 4081 #else … … 7171 7170 * Ideally, assert that the cross-dependent bits are up to date at the point of using it. 7172 7171 */ 7173 int rc = hmR0VmxLoadGuestEntryCtls(pVCpu, pMixedCtx); 7172 int rc = hmR0VmxSetupVMRunHandler(pVCpu, pMixedCtx); 7173 AssertLogRelMsgRCReturn(rc, ("hmR0VmxSetupVMRunHandler! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); 7174 7175 rc = hmR0VmxLoadGuestEntryCtls(pVCpu, pMixedCtx); 7174 7176 AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestEntryCtls! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); 7175 7177 7178 /* This needs to be done after pfnStartVM is set as it may require exit guest controls changes. */ 7176 7179 rc = hmR0VmxLoadGuestExitCtls(pVCpu, pMixedCtx); 7177 7180 AssertLogRelMsgRCReturn(rc, ("hmR0VmxSetupExitCtls failed! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); … … 7199 7202 rc = hmR0VmxLoadGuestRipRspRflags(pVCpu, pMixedCtx); 7200 7203 AssertLogRelMsgRCReturn(rc, ("hmR0VmxLoadGuestRipRspRflags! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc); 7201 7202 rc = hmR0VmxSetupVMRunHandler(pVCpu, pMixedCtx);7203 AssertLogRelMsgRCReturn(rc, ("hmR0VmxSetupVMRunHandler! rc=%Rrc (pVM=%p pVCpu=%p)\n", rc, pVM, pVCpu), rc);7204 7204 7205 7205 /* Clear any unused and reserved bits. */ … … 7472 7472 if (pVCpu->hm.s.fContextUseFlags & HM_CHANGED_HOST_CONTEXT) 7473 7473 { 7474 /* This ASSUMES that pfnStartVM has been set up already. */ 7474 7475 Assert(VMMR0ThreadCtxHooksAreRegistered(pVCpu)); 7475 7476 int rc = hmR0VmxSaveHostState(pVM, pVCpu);
Note:
See TracChangeset
for help on using the changeset viewer.