Changeset 48240 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Sep 3, 2013 1:48:43 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r48237 r48240 4059 4059 #if HC_ARCH_BITS == 32 && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 4060 4060 /* 32-bit host. We need to switch to 64-bit before running the 64-bit guest. */ 4061 pVCpu->hm.s.vmx.pfnStartVM = VMXR0SwitcherStartVM64; 4061 if (pVCpu->hm.s.vmx.pfnStartVM != VMXR0SwitcherStartVM64) 4062 { 4063 pVCpu->hm.s.vmx.pfnStartVM = VMXR0SwitcherStartVM64; 4064 /** @todo this isn't necessary, but I'm still seeing tripple faults. */ 4065 VMCPU_FF_SET(pVCpu, VMCPU_FF_TO_R3); 4066 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_VMX_EXIT_CTLS; 4067 } 4062 4068 #else 4063 4069 /* 64-bit host or hybrid host. */ … … 4078 4084 * between 16/32-bit and long mode frequently at times. */ 4079 4085 VMCPU_FF_SET(pVCpu, VMCPU_FF_TO_R3); 4086 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_VMX_EXIT_CTLS; 4080 4087 } 4081 4088 #else … … 7273 7280 * recompiler. We must be cautious what we do here regarding committing 7274 7281 * guest-state information into the VMCS assuming we assuredly execute the 7275 * guest in VT-x . If we fall back to the recompiler after updating the VMCS and7276 * clearing the common-state (TRPM/forceflags), we must undo those changes so7277 * that the recompiler can (and should) use them when it resumes guest7282 * guest in VT-x mode. If we fall back to the recompiler after updating the VMCS 7283 * and clearing the common-state (TRPM/forceflags), we must undo those changes 7284 * so that the recompiler can (and should) use them when it resumes guest 7278 7285 * execution. Otherwise such operations must be done when we can no longer 7279 7286 * exit to ring-3. 7280 7287 * 7281 * @returns VBox status code (informational status codes included). 7282 * @retval VINF_SUCCESS if we can proceed with running the guest. 7283 * @retval VINF_EM_RESET if a triple-fault occurs while injecting a double-fault 7284 * into the guest. 7285 * @retval VINF_* scheduling changes, we have to go back to ring-3. 7288 * @returns Strict VBox status code. 7289 * @retval VINF_SUCCESS if we can proceed with running the guest, interrupts 7290 * have been disabled. 7291 * @retval VINF_EM_RESET if a triple-fault occurs while injecting a 7292 * double-fault into the guest. 7293 * @retval VINF_* scheduling changes, we have to go back to ring-3. 7286 7294 * 7287 7295 * @param pVM Pointer to the VM. … … 7292 7300 * @param pVmxTransient Pointer to the VMX transient structure. 7293 7301 * 7294 * @remarks Called with preemption disabled. 7302 * @remarks Called with preemption disabled. In the VINF_SUCCESS return case 7303 * interrupts will be disabled. 7295 7304 */ 7296 7305 static int hmR0VmxPreRunGuest(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) … … 7501 7510 * @param rcVMRun Return code of VMLAUNCH/VMRESUME. 7502 7511 * 7503 * @remarks Called with interrupts disabled. 7512 * @remarks Called with interrupts disabled, and returns with interrups enabled! 7513 * 7504 7514 * @remarks No-long-jump zone!!! This function will however re-enable longjmps 7505 7515 * unconditionally when it is safe to do so. … … 7602 7612 HMVMX_ASSERT_CPU_SAFE(); 7603 7613 7604 /* Preparatory work for running guest code, this may return to ring-3 for some last minute updates. */ 7614 /* Preparatory work for running guest code, this may force us to return 7615 to ring-3. This bugger disables interrupts on VINF_SUCCESS! */ 7605 7616 STAM_PROFILE_ADV_START(&pVCpu->hm.s.StatEntry, x); 7606 7617 rc = hmR0VmxPreRunGuest(pVM, pVCpu, pCtx, &VmxTransient); … … 7612 7623 /* The guest-CPU context is now outdated, 'pCtx' is to be treated as 'pMixedCtx' from this point on!!! */ 7613 7624 7614 /* Restore any residual host-state and save any bits shared between host and guest into the guest-CPU state. */ 7625 /* Restore any residual host-state and save any bits shared between host 7626 and guest into the guest-CPU state. Re-enables interrupts! */ 7615 7627 hmR0VmxPostRunGuest(pVM, pVCpu, pCtx, &VmxTransient, rc); 7616 7628 … … 7674 7686 HMVMX_ASSERT_CPU_SAFE(); 7675 7687 7676 /* Preparatory work for running guest code, this may return to ring-3 for some last minute updates. */ 7688 /* Preparatory work for running guest code, this may force us to return 7689 to ring-3. This bugger disables interrupts on VINF_SUCCESS! */ 7677 7690 STAM_PROFILE_ADV_START(&pVCpu->hm.s.StatEntry, x); 7678 7691 rc = hmR0VmxPreRunGuest(pVM, pVCpu, pCtx, &VmxTransient); … … 7684 7697 /* The guest-CPU context is now outdated, 'pCtx' is to be treated as 'pMixedCtx' from this point on!!! */ 7685 7698 7686 /* Restore any residual host-state and save any bits shared between host and guest into the guest-CPU state. */ 7699 /* Restore any residual host-state and save any bits shared between host 7700 and guest into the guest-CPU state. Re-enables interrupts! */ 7687 7701 hmR0VmxPostRunGuest(pVM, pVCpu, pCtx, &VmxTransient, rc); 7688 7702
Note:
See TracChangeset
for help on using the changeset viewer.