- Timestamp:
- Oct 2, 2018 4:02:43 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r74541 r74563 6273 6273 6274 6274 /* 6275 * Do the job. 6276 */ 6277 RTUINT64U uValue; 6278 VBOXSTRICTRC rcStrict; 6275 * Check nested-guest intercepts. 6276 */ 6277 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 6278 if ( IEM_VMX_IS_NON_ROOT_MODE(pVCpu) 6279 && iemVmxIsRdmsrWrmsrInterceptSet(pVCpu, VMX_EXIT_RDMSR, pVCpu->cpum.GstCtx.ecx)) 6280 IEM_VMX_VMEXIT_INSTR_RET(pVCpu, VMX_EXIT_RDMSR, cbInstr); 6281 #endif 6282 6279 6283 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 6280 6284 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MSR_PROT)) 6281 6285 { 6282 rcStrict = iemSvmHandleMsrIntercept(pVCpu, pVCpu->cpum.GstCtx.ecx, false /* fWrite */);6286 VBOXSTRICTRC rcStrict = iemSvmHandleMsrIntercept(pVCpu, pVCpu->cpum.GstCtx.ecx, false /* fWrite */); 6283 6287 if (rcStrict == VINF_SVM_VMEXIT) 6284 6288 return VINF_SUCCESS; … … 6291 6295 #endif 6292 6296 6297 /* 6298 * Do the job. 6299 */ 6300 RTUINT64U uValue; 6293 6301 /** @todo make CPUMAllMsrs.cpp import the necessary MSR state. */ 6294 6302 IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_ALL_MSRS); 6295 6303 6296 rcStrict = CPUMQueryGuestMsr(pVCpu, pVCpu->cpum.GstCtx.ecx, &uValue.u);6304 VBOXSTRICTRC rcStrict = CPUMQueryGuestMsr(pVCpu, pVCpu->cpum.GstCtx.ecx, &uValue.u); 6297 6305 if (rcStrict == VINF_SUCCESS) 6298 6306 { … … 6341 6349 6342 6350 /* 6351 * Check nested-guest intercepts. 6352 */ 6353 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 6354 if ( IEM_VMX_IS_NON_ROOT_MODE(pVCpu) 6355 && iemVmxIsRdmsrWrmsrInterceptSet(pVCpu, VMX_EXIT_WRMSR, pVCpu->cpum.GstCtx.ecx)) 6356 IEM_VMX_VMEXIT_INSTR_RET(pVCpu, VMX_EXIT_WRMSR, cbInstr); 6357 #endif 6358 6359 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 6360 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MSR_PROT)) 6361 { 6362 VBOXSTRICTRC rcStrict = iemSvmHandleMsrIntercept(pVCpu, pVCpu->cpum.GstCtx.ecx, true /* fWrite */); 6363 if (rcStrict == VINF_SVM_VMEXIT) 6364 return VINF_SUCCESS; 6365 if (rcStrict != VINF_HM_INTERCEPT_NOT_ACTIVE) 6366 { 6367 Log(("IEM: SVM intercepted rdmsr(%#x) failed. rc=%Rrc\n", pVCpu->cpum.GstCtx.ecx, VBOXSTRICTRC_VAL(rcStrict))); 6368 return rcStrict; 6369 } 6370 } 6371 #endif 6372 6373 /* 6343 6374 * Do the job. 6344 6375 */ … … 6347 6378 uValue.s.Hi = pVCpu->cpum.GstCtx.edx; 6348 6379 6349 VBOXSTRICTRC rcStrict;6350 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM6351 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MSR_PROT))6352 {6353 rcStrict = iemSvmHandleMsrIntercept(pVCpu, pVCpu->cpum.GstCtx.ecx, true /* fWrite */);6354 if (rcStrict == VINF_SVM_VMEXIT)6355 return VINF_SUCCESS;6356 if (rcStrict != VINF_HM_INTERCEPT_NOT_ACTIVE)6357 {6358 Log(("IEM: SVM intercepted rdmsr(%#x) failed. rc=%Rrc\n", pVCpu->cpum.GstCtx.ecx, VBOXSTRICTRC_VAL(rcStrict)));6359 return rcStrict;6360 }6361 }6362 #endif6363 6364 6380 /** @todo make CPUMAllMsrs.cpp import the necessary MSR state. */ 6365 6381 IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_ALL_MSRS); 6366 6382 6367 rcStrict = CPUMSetGuestMsr(pVCpu, pVCpu->cpum.GstCtx.ecx, uValue.u);6383 VBOXSTRICTRC rcStrict = CPUMSetGuestMsr(pVCpu, pVCpu->cpum.GstCtx.ecx, uValue.u); 6368 6384 if (rcStrict == VINF_SUCCESS) 6369 6385 { -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r74562 r74563 37 37 * VMX_EXIT_MOV_DRX 38 38 * VMX_EXIT_IO_INSTR 39 * VMX_EXIT_RDMSR40 * VMX_EXIT_WRMSR41 39 * VMX_EXIT_MWAIT 42 40 * VMX_EXIT_MTF
Note:
See TracChangeset
for help on using the changeset viewer.