Changeset 45474 in vbox for trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
- Timestamp:
- Apr 10, 2013 8:25:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45467 r45474 387 387 * @param pVM Pointer to the VM. 388 388 * @param pVCpu Pointer to the VMCPU (can be NULL if @a rc is not 389 * VERR_VMX_GENERIC). 389 * VERR_VMX_UNABLE_TO_START_VM or 390 * VERR_VMX_INVALID_VMCS_FIELD). 390 391 * @param rc The error code. 391 392 */ … … 393 394 { 394 395 AssertPtr(pVM); 395 if (rc == VERR_VMX_GENERIC) 396 if ( rc == VERR_VMX_INVALID_VMCS_FIELD 397 || rc == VERR_VMX_UNABLE_TO_START_VM) 396 398 { 397 399 AssertPtrReturnVoid(pVCpu); … … 603 605 /* Enter VMXON root mode. */ 604 606 int rc = VMXEnable(HCPhysCpuPage); 607 if (RT_FAILURE(rc)) 608 ASMSetCR4(uCr4); 605 609 606 610 /* Restore interrupts. */ … … 1533 1537 /* Enable the VMX preemption timer. */ 1534 1538 if (pVM->hm.s.vmx.fUsePreemptTimer) 1539 { 1540 Assert(pVM->hm.s.vmx.msr.vmx_pin_ctls.n.allowed1 & VMX_VMCS_CTRL_PIN_EXEC_CONTROLS_PREEMPT_TIMER); 1535 1541 val |= VMX_VMCS_CTRL_PIN_EXEC_CONTROLS_PREEMPT_TIMER; 1542 } 1536 1543 1537 1544 if ((val & zap) != val) … … 1657 1664 * Secondary processor-based VM-execution controls. 1658 1665 */ 1659 if ( pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_SECONDARY_EXEC_CTRL)1666 if (RT_LIKELY(pVCpu->hm.s.vmx.u32ProcCtls & VMX_VMCS_CTRL_PROC_EXEC_USE_SECONDARY_EXEC_CTRL)) 1660 1667 { 1661 1668 val = pVM->hm.s.vmx.msr.vmx_proc_ctls2.n.disallowed0; /* Bits set here must be set in the VMCS. */ … … 3741 3748 AssertFailed(); 3742 3749 break; 3743 case VINF_SUCCESS: /* VMLAUNCH/VMRESUME succeeded but VM-entry failed... yeah, true story. */ 3744 case VERR_VMX_UNABLE_TO_START_VM: 3745 case VERR_VMX_UNABLE_TO_RESUME_VM: 3750 case VINF_SUCCESS: /* VMLAUNCH/VMRESUME succeeded but VM-entry failed... yeah, true story. */ 3751 case VERR_VMX_UNABLE_TO_START_VM: /* VMLAUNCH/VMRESUME itself failed. */ 3746 3752 { 3747 3753 int rc = VMXReadVmcs32(VMX_VMCS32_RO_EXIT_REASON, &pVCpu->hm.s.vmx.lasterror.u32ExitReason); … … 4099 4105 ASMSetCR4(ASMGetCR4() & ~X86_CR4_VMXE); 4100 4106 ASMSetFlags(uOldEFlags); 4101 return VERR_VMX_VMXON_FAILED;4107 return rc2; 4102 4108 } 4103 4109 … … 6924 6930 6925 6931 /** 6926 * VM-exit handler for WBINVD (VMX_EXIT_INVD). Unconditional VM-exit.6932 * VM-exit handler for INVD (VMX_EXIT_INVD). Unconditional VM-exit. 6927 6933 */ 6928 6934 static DECLCALLBACK(int) hmR0VmxExitInvd(PVM pVM, PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)
Note:
See TracChangeset
for help on using the changeset viewer.