Changeset 73756 in vbox
- Timestamp:
- Aug 18, 2018 5:13:26 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124439
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_vmx.h
r73752 r73756 2775 2775 kVmxVInstrDiag_Vmptrst_Cpl, 2776 2776 kVmxVInstrDiag_Vmptrst_PtrMap, 2777 /* VMCLEAR. */ 2778 kVmxVInstrDiag_Vmclear_Cpl, 2777 2779 /* Last member for determining array index limit. */ 2778 2780 kVmxVInstrDiag_Last -
trunk/include/VBox/vmm/iem.h
r73752 r73756 324 324 VMM_INT_DECL(VBOXSTRICTRC) IEMExecDecodedVmptrst(PVMCPU pVCpu, uint8_t cbInstr, RTGCPHYS GCPtrVmcs, uint32_t uExitInstrInfo, 325 325 RTGCPTR GCPtrDisp); 326 VMM_INT_DECL(VBOXSTRICTRC) IEMExecDecodedVmclear(PVMCPU pVCpu, uint8_t cbInstr, RTGCPHYS GCPtrVmcs, uint32_t uExitInstrInfo, 327 RTGCPTR GCPtrDisp); 326 328 VMM_INT_DECL(VBOXSTRICTRC) IEMExecDecodedVmxon(PVMCPU pVCpu, uint8_t cbInstr, RTGCPTR GCPtrVmxon, uint32_t uExitInstrInfo, 327 329 RTGCPTR GCPtrDisp); -
trunk/src/VBox/VMM/VMMAll/HMVMXAll.cpp
r73752 r73756 84 84 /* VMPTRST. */ 85 85 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmptrst_Cpl , "Cpl" ), 86 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmptrst_PtrMap , "PtrMap" ) 86 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmptrst_PtrMap , "PtrMap" ), 87 /* VMCLEAR. */ 88 VMX_INSTR_DIAG_DESC(kVmxVInstrDiag_Vmclear_Cpl , "Cpl" ) 87 89 /* kVmxVInstrDiag_Last */ 88 90 }; -
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r73752 r73756 15583 15583 15584 15584 /** 15585 * Interface for HM and EM to emulate the VMCLEAR instruction. 15586 * 15587 * @returns Strict VBox status code. 15588 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 15589 * @param cbInstr The instruction length in bytes. 15590 * @param GCPtrVmxon The linear address of the VMCS pointer. 15591 * @param uExitInstrInfo The VM-exit instruction information field. 15592 * @param GCPtrDisp The displacement field for @a GCPtrVmcs if any. 15593 * @thread EMT(pVCpu) 15594 */ 15595 VMM_INT_DECL(VBOXSTRICTRC) IEMExecDecodedVmclear(PVMCPU pVCpu, uint8_t cbInstr, RTGCPHYS GCPtrVmcs, uint32_t uExitInstrInfo, 15596 RTGCPTR GCPtrDisp) 15597 { 15598 IEMEXEC_ASSERT_INSTR_LEN_RETURN(cbInstr, 3); 15599 IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_HWVIRT); 15600 15601 iemInitExec(pVCpu, false /*fBypassHandlers*/); 15602 PCVMXEXITINSTRINFO pExitInstrInfo = (PCVMXEXITINSTRINFO)&uExitInstrInfo; 15603 VBOXSTRICTRC rcStrict = iemVmxVmclear(pVCpu, cbInstr, GCPtrVmcs, pExitInstrInfo, GCPtrDisp); 15604 if (pVCpu->iem.s.cActiveMappings) 15605 iemMemRollback(pVCpu); 15606 return iemExecStatusCodeFiddling(pVCpu, rcStrict); 15607 } 15608 15609 15610 /** 15585 15611 * Interface for HM and EM to emulate the VMXON instruction. 15586 15612 * -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r73755 r73756 481 481 482 482 /** 483 * VMCLEAR instruction execution worker. 484 * 485 * @param pVCpu The cross context virtual CPU structure. 486 * @param cbInstr The instruction length. 487 * @param GCPtrVmcs The linear address of the VMCS pointer. 488 * @param pExitInstrInfo Pointer to the VM-exit instruction information field. 489 * @param GCPtrDisp The displacement field for @a GCPtrVmcs if any. 490 * 491 * @remarks Common VMX instruction checks are already expected to by the caller, 492 * i.e. VMX operation, CR4.VMXE, Real/V86 mode, EFER/CS.L checks. 493 */ 494 IEM_STATIC VBOXSTRICTRC iemVmxVmclear(PVMCPU pVCpu, uint8_t cbInstr, RTGCPHYS GCPtrVmcs, PCVMXEXITINSTRINFO pExitInstrInfo, 495 RTGCPTR GCPtrDisp) 496 { 497 if (IEM_IS_VMX_NON_ROOT_MODE(pVCpu)) 498 { 499 RT_NOREF(GCPtrDisp); 500 /** @todo NSTVMX: intercept. */ 501 } 502 Assert(IEM_IS_VMX_ROOT_MODE(pVCpu)); 503 504 /* CPL. */ 505 if (CPUMGetGuestCPL(pVCpu) > 0) 506 { 507 Log(("vmclear: CPL %u -> #GP(0)\n", pVCpu->iem.s.uCpl)); 508 pVCpu->cpum.GstCtx.hwvirt.vmx.enmInstrDiag = kVmxVInstrDiag_Vmclear_Cpl; 509 return iemRaiseGeneralProtectionFault0(pVCpu); 510 } 511 512 /** @todo NSTVMX: VMCLEAR impl. */ 513 RT_NOREF(GCPtrVmcs); RT_NOREF(pExitInstrInfo); RT_NOREF(cbInstr); 514 return VINF_SUCCESS; 515 } 516 517 518 /** 483 519 * VMPTRST instruction execution worker. 484 520 * … … 928 964 } 929 965 966 967 /** 968 * Implements 'VMCLEAR'. 969 */ 970 IEM_CIMPL_DEF_1(iemCImpl_vmclear, RTGCPTR, GCPtrVmcs) 971 { 972 RTGCPTR GCPtrDisp; 973 VMXEXITINSTRINFO ExitInstrInfo; 974 ExitInstrInfo.u = iemVmxGetExitInstrInfo(pVCpu, VMX_EXIT_VMCLEAR, VMX_INSTR_ID_NONE, &GCPtrDisp); 975 return iemVmxVmclear(pVCpu, cbInstr, GCPtrVmcs, &ExitInstrInfo, GCPtrDisp); 976 } 977 930 978 #endif 931 979 -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructionsTwoByte0f.cpp.h
r73755 r73756 8440 8440 8441 8441 /** Opcode 0x66 0x0f 0xc7 !11/6. */ 8442 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 8443 FNIEMOP_DEF_1(iemOp_Grp9_vmclear_Mq, uint8_t, bRm) 8444 { 8445 IEMOP_MNEMONIC(vmclear, "vmclear"); 8446 IEMOP_HLP_IN_VMX_OPERATION(); 8447 IEMOP_HLP_VMX_INSTR(); 8448 IEM_MC_BEGIN(1, 0); 8449 IEM_MC_ARG(RTGCPTR, GCPtrEffDst, 0); 8450 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm, 0); 8451 IEMOP_HLP_DONE_DECODING(); 8452 IEM_MC_CALL_CIMPL_1(iemCImpl_vmclear, GCPtrEffDst); 8453 IEM_MC_END(); 8454 return VINF_SUCCESS; 8455 } 8456 #else 8442 8457 FNIEMOP_UD_STUB_1(iemOp_Grp9_vmclear_Mq, uint8_t, bRm); 8458 #endif 8443 8459 8444 8460 /** Opcode 0xf3 0x0f 0xc7 !11/6. */
Note:
See TracChangeset
for help on using the changeset viewer.