Changeset 45474 in vbox
- Timestamp:
- Apr 10, 2013 8:25:33 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84919
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r45434 r45474 1858 1858 /** Invalid VMXON pointer. */ 1859 1859 #define VERR_VMX_INVALID_VMXON_PTR (-4002) 1860 /** Generic VMX failure. */1861 #define VERR_VMX_GENERIC (-4003)1862 1860 /** Invalid CPU mode for VMX execution. */ 1863 1861 #define VERR_VMX_UNSUPPORTED_MODE (-4004) 1864 1862 /** Unable to start VM execution. */ 1865 1863 #define VERR_VMX_UNABLE_TO_START_VM (-4005) 1866 /** Unable to resume VM execution. */1867 #define VERR_VMX_UNABLE_TO_RESUME_VM (-4006)1868 1864 /** Unable to switch due to invalid host state. */ 1869 1865 #define VERR_VMX_INVALID_HOST_STATE (-4007) … … 1894 1890 /** Resume guest execution after injecting a double-fault. */ 1895 1891 #define VINF_VMX_DOUBLE_FAULT 4020 1892 /** VMPTRLD failed; possibly because of invalid VMCS launch-state. */ 1893 #define VERR_VMX_VMPTRLD_FAILED (-4021) 1896 1894 /** @} */ 1897 1895 -
trunk/include/VBox/err.mac
r43387 r45474 682 682 %define VERR_VMX_INVALID_VMCS_PTR (-4001) 683 683 %define VERR_VMX_INVALID_VMXON_PTR (-4002) 684 %define VERR_VMX_GENERIC (-4003)685 684 %define VERR_VMX_UNSUPPORTED_MODE (-4004) 686 685 %define VERR_VMX_UNABLE_TO_START_VM (-4005) … … 698 697 %define VERR_VMX_UNEXPECTED_INTERRUPTION_EXIT_CODE (-4017) 699 698 %define VERR_VMX_NOT_IN_VMX_ROOT_MODE (-4018) 699 %define VERR_VMX_UNDEFINED_EXIT_CODE (-4019) 700 %define VINF_VMX_DOUBLE_FAULT 4020 701 %define VERR_VMX_VMPTRLD_FAILED (-4021) 700 702 %define VERR_SVM_UNABLE_TO_START_VM (-4050) 701 703 %define VERR_SVM_ILLEGAL_EFER_MSR (-4051) -
trunk/include/VBox/vmm/hm_vmx.h
r45411 r45474 1473 1473 "jmp 2f \n\t" 1474 1474 "1: \n\t" 1475 "movl $"STR(VERR_VMX_ GENERIC)", %0\n\t"1475 "movl $"STR(VERR_VMX_VMXON_FAILED)", %0 \n\t" 1476 1476 "2: \n\t" 1477 1477 "add $8, %%esp \n\t" … … 1498 1498 vmxon_good: 1499 1499 jnz the_end 1500 mov dword ptr [rc], VERR_VMX_ GENERIC1500 mov dword ptr [rc], VERR_VMX_VMXON_FAILED 1501 1501 the_end: 1502 1502 add esp, 8 -
trunk/src/VBox/VMM/VMMR0/HMR0A.asm
r44771 r45474 567 567 .good: 568 568 jnz .the_end 569 mov eax, VERR_VMX_ GENERIC569 mov eax, VERR_VMX_VMXON_FAILED 570 570 571 571 .the_end: -
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) -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r45453 r45474 179 179 static void hmR0VmxCheckError(PVM pVM, PVMCPU pVCpu, int rc) 180 180 { 181 if (rc == VERR_VMX_GENERIC) 181 if ( rc == VERR_VMX_UNABLE_TO_START_VM 182 || rc == VERR_VMX_INVALID_VMCS_FIELD) 182 183 { 183 184 RTCCUINTREG instrError; … … 535 536 */ 536 537 pVM->hm.s.vmx.enmFlushEpt = VMX_FLUSH_EPT_NOT_SUPPORTED; 537 return VERR_ VMX_GENERIC;538 return VERR_HM_UNSUPPORTED_CPU_FEATURE_COMBO; 538 539 } 539 540 } … … 544 545 */ 545 546 pVM->hm.s.vmx.enmFlushEpt = VMX_FLUSH_EPT_NOT_SUPPORTED; 546 return VERR_ VMX_GENERIC;547 return VERR_HM_UNSUPPORTED_CPU_FEATURE_COMBO; 547 548 } 548 549 } … … 5285 5286 5286 5287 case VERR_VMX_UNABLE_TO_START_VM: 5287 case VERR_VMX_UNABLE_TO_RESUME_VM:5288 5288 { 5289 5289 int rc2; -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r45457 r45474 2634 2634 break; 2635 2635 2636 case VERR_VMX_UNABLE_TO_RESUME_VM:2637 LogRel(("HM: VERR_VMX_UNABLE_TO_RESUME_VM:\n"));2638 LogRel(("HM: CPU%d instruction error %x\n", i, pVM->aCpus[i].hm.s.vmx.lasterror.u32InstrError));2639 LogRel(("HM: CPU%d exit reason %x\n", i, pVM->aCpus[i].hm.s.vmx.lasterror.u32ExitReason));2640 break;2641 2642 2636 case VERR_VMX_INVALID_VMXON_PTR: 2643 2637 break; -
trunk/src/VBox/VMM/VMMRC/HMRCA.asm
r44771 r45474 113 113 .vmxon_success: 114 114 jnz .vmxon_success2 115 mov rax, VERR_VMX_ GENERIC115 mov rax, VERR_VMX_VMXON_FAILED 116 116 jmp .vmstart64_vmxon_failed 117 117 … … 125 125 .vmptrld_success: 126 126 jnz .vmptrld_success2 127 mov rax, VERR_VMX_ GENERIC127 mov rax, VERR_VMX_VMPTRLD_FAILED 128 128 jmp .vmstart64_vmxoff_end 129 129 -
trunk/src/VBox/VMM/include/EMHandleRCTmpl.h
r44362 r45474 346 346 case VERR_VMX_INVALID_GUEST_STATE: 347 347 case VERR_VMX_UNABLE_TO_START_VM: 348 case VERR_VMX_UNABLE_TO_RESUME_VM:349 348 HMR3CheckError(pVM, rc); 350 349 break;
Note:
See TracChangeset
for help on using the changeset viewer.