Changeset 74336 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Sep 18, 2018 9:50:48 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r74332 r74336 401 401 402 402 #else 403 # define IEM_VMX_INSTR_COMMON_CHECKS(a_pVCpu, a_szInstr, a_InsDiagPrefix) do { } while (0)404 403 # define IEM_IS_VMX_ENABLED(a_pVCpu) (false) 405 404 # define IEM_IS_VMX_ROOT_MODE(a_pVCpu) (false) … … 412 411 * Check if an SVM control/instruction intercept is set. 413 412 */ 414 # define IEM_ IS_SVM_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept) (CPUMIsGuestSvmCtrlInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_Intercept)))413 # define IEM_SVM_IS_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept) (CPUMIsGuestSvmCtrlInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_Intercept))) 415 414 416 415 /** 417 416 * Check if an SVM read CRx intercept is set. 418 417 */ 419 # define IEM_ IS_SVM_READ_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (CPUMIsGuestSvmReadCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr)))418 # define IEM_SVM_IS_READ_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (CPUMIsGuestSvmReadCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr))) 420 419 421 420 /** 422 421 * Check if an SVM write CRx intercept is set. 423 422 */ 424 # define IEM_ IS_SVM_WRITE_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (CPUMIsGuestSvmWriteCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr)))423 # define IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (CPUMIsGuestSvmWriteCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr))) 425 424 426 425 /** 427 426 * Check if an SVM read DRx intercept is set. 428 427 */ 429 # define IEM_ IS_SVM_READ_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (CPUMIsGuestSvmReadDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr)))428 # define IEM_SVM_IS_READ_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (CPUMIsGuestSvmReadDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr))) 430 429 431 430 /** 432 431 * Check if an SVM write DRx intercept is set. 433 432 */ 434 # define IEM_ IS_SVM_WRITE_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (CPUMIsGuestSvmWriteDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr)))433 # define IEM_SVM_IS_WRITE_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (CPUMIsGuestSvmWriteDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr))) 435 434 436 435 /** 437 436 * Check if an SVM exception intercept is set. 438 437 */ 439 # define IEM_ IS_SVM_XCPT_INTERCEPT_SET(a_pVCpu, a_uVector) (CPUMIsGuestSvmXcptInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uVector)))438 # define IEM_SVM_IS_XCPT_INTERCEPT_SET(a_pVCpu, a_uVector) (CPUMIsGuestSvmXcptInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uVector))) 440 439 441 440 /** … … 464 463 * NRIP if needed. 465 464 */ 466 # define IEM_ CHECK_SVM_INSTR_INTERCEPT(a_pVCpu, a_Intercept, a_uExitCode, a_uExitInfo1, a_uExitInfo2) \465 # define IEM_SVM_CHECK_INSTR_INTERCEPT(a_pVCpu, a_Intercept, a_uExitCode, a_uExitInfo1, a_uExitInfo2) \ 467 466 do \ 468 467 { \ 469 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept)) \468 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept)) \ 470 469 { \ 471 IEM_ UPDATE_SVM_NRIP(a_pVCpu); \470 IEM_SVM_UPDATE_NRIP(a_pVCpu); \ 472 471 IEM_SVM_VMEXIT_RET(a_pVCpu, a_uExitCode, a_uExitInfo1, a_uExitInfo2); \ 473 472 } \ … … 475 474 476 475 /** Checks and handles SVM nested-guest CR0 read intercept. */ 477 # define IEM_ CHECK_SVM_READ_CR0_INTERCEPT(a_pVCpu, a_uExitInfo1, a_uExitInfo2) \476 # define IEM_SVM_CHECK_READ_CR0_INTERCEPT(a_pVCpu, a_uExitInfo1, a_uExitInfo2) \ 478 477 do \ 479 478 { \ 480 if (!IEM_ IS_SVM_READ_CR_INTERCEPT_SET(a_pVCpu, 0)) \479 if (!IEM_SVM_IS_READ_CR_INTERCEPT_SET(a_pVCpu, 0)) \ 481 480 { /* probably likely */ } \ 482 481 else \ 483 482 { \ 484 IEM_ UPDATE_SVM_NRIP(a_pVCpu); \483 IEM_SVM_UPDATE_NRIP(a_pVCpu); \ 485 484 IEM_SVM_VMEXIT_RET(a_pVCpu, SVM_EXIT_READ_CR0, a_uExitInfo1, a_uExitInfo2); \ 486 485 } \ … … 490 489 * Updates the NextRIP (NRI) field in the nested-guest VMCB. 491 490 */ 492 # define IEM_ UPDATE_SVM_NRIP(a_pVCpu) \491 # define IEM_SVM_UPDATE_NRIP(a_pVCpu) \ 493 492 do { \ 494 493 if (IEM_GET_GUEST_CPU_FEATURES(a_pVCpu)->fSvmNextRipSave) \ … … 497 496 498 497 #else 499 # define IEM_ IS_SVM_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept) (false)500 # define IEM_ IS_SVM_READ_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (false)501 # define IEM_ IS_SVM_WRITE_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (false)502 # define IEM_ IS_SVM_READ_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (false)503 # define IEM_ IS_SVM_WRITE_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (false)504 # define IEM_ IS_SVM_XCPT_INTERCEPT_SET(a_pVCpu, a_uVector) (false)498 # define IEM_SVM_IS_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept) (false) 499 # define IEM_SVM_IS_READ_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (false) 500 # define IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (false) 501 # define IEM_SVM_IS_READ_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (false) 502 # define IEM_SVM_IS_WRITE_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (false) 503 # define IEM_SVM_IS_XCPT_INTERCEPT_SET(a_pVCpu, a_uVector) (false) 505 504 # define IEM_SVM_VMEXIT_RET(a_pVCpu, a_uExitCode, a_uExitInfo1, a_uExitInfo2) do { return VERR_SVM_IPE_1; } while (0) 506 505 # define IEM_SVM_CRX_VMEXIT_RET(a_pVCpu, a_uExitCode, a_enmAccessCrX, a_iGReg) do { return VERR_SVM_IPE_1; } while (0) 507 # define IEM_ CHECK_SVM_INSTR_INTERCEPT(a_pVCpu, a_Intercept, a_uExitCode, a_uExitInfo1, a_uExitInfo2) do { } while (0)508 # define IEM_ CHECK_SVM_READ_CR0_INTERCEPT(a_pVCpu, a_uExitInfo1, a_uExitInfo2) do { } while (0)509 # define IEM_ UPDATE_SVM_NRIP(a_pVCpu) do { } while (0)506 # define IEM_SVM_CHECK_INSTR_INTERCEPT(a_pVCpu, a_Intercept, a_uExitCode, a_uExitInfo1, a_uExitInfo2) do { } while (0) 507 # define IEM_SVM_CHECK_READ_CR0_INTERCEPT(a_pVCpu, a_uExitInfo1, a_uExitInfo2) do { } while (0) 508 # define IEM_SVM_UPDATE_NRIP(a_pVCpu) do { } while (0) 510 509 511 510 #endif … … 3408 3407 IEM_STATIC VBOXSTRICTRC iemInitiateCpuShutdown(PVMCPU pVCpu) 3409 3408 { 3410 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_SHUTDOWN))3409 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_SHUTDOWN)) 3411 3410 { 3412 3411 Log2(("shutdown: Guest intercept -> #VMEXIT\n")); … … 3981 3980 * after validating the incoming (new) TSS, see AMD spec. 15.14.1 "Task Switch Intercept". 3982 3981 */ 3983 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_TASK_SWITCH))3982 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_TASK_SWITCH)) 3984 3983 { 3985 3984 uint32_t const uExitInfo1 = SelTSS; … … 5497 5496 uErr = 0; 5498 5497 /* SVM nested-guest #DF intercepts need to be checked now. See AMD spec. 15.12 "Exception Intercepts". */ 5499 if (IEM_ IS_SVM_XCPT_INTERCEPT_SET(pVCpu, X86_XCPT_DF))5498 if (IEM_SVM_IS_XCPT_INTERCEPT_SET(pVCpu, X86_XCPT_DF)) 5500 5499 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_XCPT_DF, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 5501 5500 } -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r74332 r74336 548 548 VBOXSTRICTRC rcStrict; 549 549 550 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_PUSHF))550 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_PUSHF)) 551 551 { 552 552 Log2(("pushf: Guest intercept -> #VMEXIT\n")); 553 IEM_ UPDATE_SVM_NRIP(pVCpu);553 IEM_SVM_UPDATE_NRIP(pVCpu); 554 554 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_PUSHF, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 555 555 } … … 615 615 uint32_t fEflNew; 616 616 617 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_POPF))617 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_POPF)) 618 618 { 619 619 Log2(("popf: Guest intercept -> #VMEXIT\n")); 620 IEM_ UPDATE_SVM_NRIP(pVCpu);620 IEM_SVM_UPDATE_NRIP(pVCpu); 621 621 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_POPF, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 622 622 } … … 3853 3853 * see AMD spec. "15.9 Instruction Intercepts". 3854 3854 */ 3855 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IRET))3855 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IRET)) 3856 3856 { 3857 3857 Log(("iret: Guest intercept -> #VMEXIT\n")); 3858 IEM_ UPDATE_SVM_NRIP(pVCpu);3858 IEM_SVM_UPDATE_NRIP(pVCpu); 3859 3859 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_IRET, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 3860 3860 } … … 4632 4632 Assert(!pVCpu->cpum.GstCtx.eflags.Bits.u1VM); 4633 4633 4634 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_GDTR_WRITES))4634 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_GDTR_WRITES)) 4635 4635 { 4636 4636 Log(("lgdt: Guest intercept -> #VMEXIT\n")); 4637 IEM_ UPDATE_SVM_NRIP(pVCpu);4637 IEM_SVM_UPDATE_NRIP(pVCpu); 4638 4638 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_GDTR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 4639 4639 } … … 4677 4677 * you really must know. 4678 4678 */ 4679 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_GDTR_READS))4679 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_GDTR_READS)) 4680 4680 { 4681 4681 Log(("sgdt: Guest intercept -> #VMEXIT\n")); 4682 IEM_ UPDATE_SVM_NRIP(pVCpu);4682 IEM_SVM_UPDATE_NRIP(pVCpu); 4683 4683 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_GDTR_READ, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 4684 4684 } … … 4705 4705 Assert(!pVCpu->cpum.GstCtx.eflags.Bits.u1VM); 4706 4706 4707 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IDTR_WRITES))4707 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IDTR_WRITES)) 4708 4708 { 4709 4709 Log(("lidt: Guest intercept -> #VMEXIT\n")); 4710 IEM_ UPDATE_SVM_NRIP(pVCpu);4710 IEM_SVM_UPDATE_NRIP(pVCpu); 4711 4711 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_IDTR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 4712 4712 } … … 4749 4749 * you really must know. 4750 4750 */ 4751 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IDTR_READS))4751 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IDTR_READS)) 4752 4752 { 4753 4753 Log(("sidt: Guest intercept -> #VMEXIT\n")); 4754 IEM_ UPDATE_SVM_NRIP(pVCpu);4754 IEM_SVM_UPDATE_NRIP(pVCpu); 4755 4755 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_IDTR_READ, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 4756 4756 } … … 4796 4796 { 4797 4797 /* Nested-guest SVM intercept. */ 4798 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_LDTR_WRITES))4798 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_LDTR_WRITES)) 4799 4799 { 4800 4800 Log(("lldt: Guest intercept -> #VMEXIT\n")); 4801 IEM_ UPDATE_SVM_NRIP(pVCpu);4801 IEM_SVM_UPDATE_NRIP(pVCpu); 4802 4802 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_LDTR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 4803 4803 } … … 4872 4872 4873 4873 /* Nested-guest SVM intercept. */ 4874 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_LDTR_WRITES))4874 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_LDTR_WRITES)) 4875 4875 { 4876 4876 Log(("lldt: Guest intercept -> #VMEXIT\n")); 4877 IEM_ UPDATE_SVM_NRIP(pVCpu);4877 IEM_SVM_UPDATE_NRIP(pVCpu); 4878 4878 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_LDTR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 4879 4879 } … … 4903 4903 IEM_CIMPL_DEF_2(iemCImpl_sldt_reg, uint8_t, iGReg, uint8_t, enmEffOpSize) 4904 4904 { 4905 IEM_ CHECK_SVM_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_LDTR_READS, SVM_EXIT_LDTR_READ, 0, 0);4905 IEM_SVM_CHECK_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_LDTR_READS, SVM_EXIT_LDTR_READ, 0, 0); 4906 4906 4907 4907 IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_LDTR); … … 4927 4927 IEM_CIMPL_DEF_2(iemCImpl_sldt_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst) 4928 4928 { 4929 IEM_ CHECK_SVM_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_LDTR_READS, SVM_EXIT_LDTR_READ, 0, 0);4929 IEM_SVM_CHECK_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_LDTR_READS, SVM_EXIT_LDTR_READ, 0, 0); 4930 4930 4931 4931 IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_LDTR); … … 4967 4967 return iemRaiseGeneralProtectionFault0(pVCpu); 4968 4968 } 4969 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_TR_WRITES))4969 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_TR_WRITES)) 4970 4970 { 4971 4971 Log(("ltr: Guest intercept -> #VMEXIT\n")); 4972 IEM_ UPDATE_SVM_NRIP(pVCpu);4972 IEM_SVM_UPDATE_NRIP(pVCpu); 4973 4973 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_TR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 4974 4974 } … … 5068 5068 IEM_CIMPL_DEF_2(iemCImpl_str_reg, uint8_t, iGReg, uint8_t, enmEffOpSize) 5069 5069 { 5070 IEM_ CHECK_SVM_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_TR_READS, SVM_EXIT_TR_READ, 0, 0);5070 IEM_SVM_CHECK_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_TR_READS, SVM_EXIT_TR_READ, 0, 0); 5071 5071 5072 5072 IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_TR); … … 5092 5092 IEM_CIMPL_DEF_2(iemCImpl_str_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst) 5093 5093 { 5094 IEM_ CHECK_SVM_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_TR_READS, SVM_EXIT_TR_READ, 0, 0);5094 IEM_SVM_CHECK_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_TR_READS, SVM_EXIT_TR_READ, 0, 0); 5095 5095 5096 5096 IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_TR); … … 5114 5114 Assert(!pVCpu->cpum.GstCtx.eflags.Bits.u1VM); 5115 5115 5116 if (IEM_ IS_SVM_READ_CR_INTERCEPT_SET(pVCpu, iCrReg))5116 if (IEM_SVM_IS_READ_CR_INTERCEPT_SET(pVCpu, iCrReg)) 5117 5117 { 5118 5118 Log(("iemCImpl_mov_Rd_Cd: Guest intercept CR%u -> #VMEXIT\n", iCrReg)); 5119 IEM_ UPDATE_SVM_NRIP(pVCpu);5119 IEM_SVM_UPDATE_NRIP(pVCpu); 5120 5120 IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_READ_CR0 + iCrReg, IEMACCESSCRX_MOV_CRX, iGReg); 5121 5121 } … … 5187 5187 IEM_CIMPL_DEF_2(iemCImpl_smsw_reg, uint8_t, iGReg, uint8_t, enmEffOpSize) 5188 5188 { 5189 IEM_ CHECK_SVM_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);5189 IEM_SVM_CHECK_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 5190 5190 5191 5191 switch (enmEffOpSize) … … 5225 5225 IEM_CIMPL_DEF_2(iemCImpl_smsw_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst) 5226 5226 { 5227 IEM_ CHECK_SVM_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);5227 IEM_SVM_CHECK_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 5228 5228 5229 5229 uint16_t u16Value; … … 5352 5352 * SVM nested-guest CR0 write intercepts. 5353 5353 */ 5354 if (IEM_ IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, iCrReg))5354 if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, iCrReg)) 5355 5355 { 5356 5356 Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg)); 5357 IEM_ UPDATE_SVM_NRIP(pVCpu);5357 IEM_SVM_UPDATE_NRIP(pVCpu); 5358 5358 IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR0, enmAccessCrX, iGReg); 5359 5359 } 5360 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_CR0_SEL_WRITE))5360 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_CR0_SEL_WRITE)) 5361 5361 { 5362 5362 /* 'lmsw' intercepts regardless of whether the TS/MP bits are actually toggled. */ … … 5366 5366 Assert(enmAccessCrX != IEMACCESSCRX_CLTS); 5367 5367 Log(("iemCImpl_load_Cr%#x: lmsw or bits other than TS/MP changed: Guest intercept -> #VMEXIT\n", iCrReg)); 5368 IEM_ UPDATE_SVM_NRIP(pVCpu);5368 IEM_SVM_UPDATE_NRIP(pVCpu); 5369 5369 IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_CR0_SEL_WRITE, enmAccessCrX, iGReg); 5370 5370 } … … 5420 5420 case 2: 5421 5421 { 5422 if (IEM_ IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 2))5422 if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 2)) 5423 5423 { 5424 5424 Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg)); 5425 IEM_ UPDATE_SVM_NRIP(pVCpu);5425 IEM_SVM_UPDATE_NRIP(pVCpu); 5426 5426 IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR2, enmAccessCrX, iGReg); 5427 5427 } … … 5476 5476 } 5477 5477 5478 if (IEM_ IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 3))5478 if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 3)) 5479 5479 { 5480 5480 Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg)); 5481 IEM_ UPDATE_SVM_NRIP(pVCpu);5481 IEM_SVM_UPDATE_NRIP(pVCpu); 5482 5482 IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR3, enmAccessCrX, iGReg); 5483 5483 } … … 5555 5555 } 5556 5556 5557 if (IEM_ IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 4))5557 if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 4)) 5558 5558 { 5559 5559 Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg)); 5560 IEM_ UPDATE_SVM_NRIP(pVCpu);5560 IEM_SVM_UPDATE_NRIP(pVCpu); 5561 5561 IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR4, enmAccessCrX, iGReg); 5562 5562 } … … 5620 5620 if (CPUMIsGuestInSvmNestedHwVirtMode(IEM_GET_CTX(pVCpu))) 5621 5621 { 5622 if (IEM_ IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 8))5622 if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 8)) 5623 5623 { 5624 5624 Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg)); 5625 IEM_ UPDATE_SVM_NRIP(pVCpu);5625 IEM_SVM_UPDATE_NRIP(pVCpu); 5626 5626 IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR8, enmAccessCrX, iGReg); 5627 5627 } … … 5794 5794 * Check for any SVM nested-guest intercepts for the DRx read. 5795 5795 */ 5796 if (IEM_ IS_SVM_READ_DR_INTERCEPT_SET(pVCpu, iDrReg))5796 if (IEM_SVM_IS_READ_DR_INTERCEPT_SET(pVCpu, iDrReg)) 5797 5797 { 5798 5798 Log(("mov r%u,dr%u: Guest intercept -> #VMEXIT\n", iGReg, iDrReg)); 5799 IEM_ UPDATE_SVM_NRIP(pVCpu);5799 IEM_SVM_UPDATE_NRIP(pVCpu); 5800 5800 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_READ_DR0 + (iDrReg & 0xf), 5801 5801 IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSvmDecodeAssists ? (iGReg & 7) : 0, 0 /* uExitInfo2 */); … … 5895 5895 * Check for any SVM nested-guest intercepts for the DRx write. 5896 5896 */ 5897 if (IEM_ IS_SVM_WRITE_DR_INTERCEPT_SET(pVCpu, iDrReg))5897 if (IEM_SVM_IS_WRITE_DR_INTERCEPT_SET(pVCpu, iDrReg)) 5898 5898 { 5899 5899 Log2(("mov dr%u,r%u: Guest intercept -> #VMEXIT\n", iDrReg, iGReg)); 5900 IEM_ UPDATE_SVM_NRIP(pVCpu);5900 IEM_SVM_UPDATE_NRIP(pVCpu); 5901 5901 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_DR0 + (iDrReg & 0xf), 5902 5902 IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSvmDecodeAssists ? (iGReg & 7) : 0, 0 /* uExitInfo2 */); … … 5933 5933 IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR0 | CPUMCTX_EXTRN_CR3 | CPUMCTX_EXTRN_CR4 | CPUMCTX_EXTRN_EFER); 5934 5934 5935 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_INVLPG))5935 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_INVLPG)) 5936 5936 { 5937 5937 Log(("invlpg: Guest intercept (%RGp) -> #VMEXIT\n", GCPtrPage)); 5938 IEM_ UPDATE_SVM_NRIP(pVCpu);5938 IEM_SVM_UPDATE_NRIP(pVCpu); 5939 5939 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_INVLPG, 5940 5940 IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSvmDecodeAssists ? GCPtrPage : 0, 0 /* uExitInfo2 */); … … 6071 6071 } 6072 6072 6073 IEM_ CHECK_SVM_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_INVD, SVM_EXIT_INVD, 0, 0);6073 IEM_SVM_CHECK_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_INVD, SVM_EXIT_INVD, 0, 0); 6074 6074 6075 6075 /* We currently take no action here. */ … … 6090 6090 } 6091 6091 6092 IEM_ CHECK_SVM_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_WBINVD, SVM_EXIT_WBINVD, 0, 0);6092 IEM_SVM_CHECK_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_WBINVD, SVM_EXIT_WBINVD, 0, 0); 6093 6093 6094 6094 /* We currently take no action here. */ … … 6101 6101 IEM_CIMPL_DEF_0(iemCImpl_rsm) 6102 6102 { 6103 IEM_ CHECK_SVM_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_RSM, SVM_EXIT_RSM, 0, 0);6103 IEM_SVM_CHECK_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_RSM, SVM_EXIT_RSM, 0, 0); 6104 6104 NOREF(cbInstr); 6105 6105 return iemRaiseUndefinedOpcode(pVCpu); … … 6128 6128 } 6129 6129 6130 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_RDTSC))6130 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_RDTSC)) 6131 6131 { 6132 6132 Log(("rdtsc: Guest intercept -> #VMEXIT\n")); 6133 IEM_ UPDATE_SVM_NRIP(pVCpu);6133 IEM_SVM_UPDATE_NRIP(pVCpu); 6134 6134 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_RDTSC, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 6135 6135 } … … 6171 6171 } 6172 6172 6173 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_RDTSCP))6173 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_RDTSCP)) 6174 6174 { 6175 6175 Log(("rdtscp: Guest intercept -> #VMEXIT\n")); 6176 IEM_ UPDATE_SVM_NRIP(pVCpu);6176 IEM_SVM_UPDATE_NRIP(pVCpu); 6177 6177 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_RDTSCP, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 6178 6178 } … … 6213 6213 return iemRaiseGeneralProtectionFault0(pVCpu); 6214 6214 6215 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_RDPMC))6215 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_RDPMC)) 6216 6216 { 6217 6217 Log(("rdpmc: Guest intercept -> #VMEXIT\n")); 6218 IEM_ UPDATE_SVM_NRIP(pVCpu);6218 IEM_SVM_UPDATE_NRIP(pVCpu); 6219 6219 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_RDPMC, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 6220 6220 } … … 6251 6251 VBOXSTRICTRC rcStrict; 6252 6252 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 6253 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MSR_PROT))6253 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MSR_PROT)) 6254 6254 { 6255 6255 rcStrict = iemSvmHandleMsrIntercept(pVCpu, pVCpu->cpum.GstCtx.ecx, false /* fWrite */); … … 6322 6322 VBOXSTRICTRC rcStrict; 6323 6323 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 6324 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MSR_PROT))6324 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MSR_PROT)) 6325 6325 { 6326 6326 rcStrict = iemSvmHandleMsrIntercept(pVCpu, pVCpu->cpum.GstCtx.ecx, true /* fWrite */); … … 6386 6386 */ 6387 6387 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 6388 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT))6388 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 6389 6389 { 6390 6390 uint8_t cAddrSizeBits; … … 6479 6479 */ 6480 6480 #ifdef VBOX_WITH_NESTED_HWVIRT_SVM 6481 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT))6481 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 6482 6482 { 6483 6483 uint8_t cAddrSizeBits; … … 6650 6650 return iemRaiseGeneralProtectionFault0(pVCpu); 6651 6651 6652 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_HLT))6652 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_HLT)) 6653 6653 { 6654 6654 Log2(("hlt: Guest intercept -> #VMEXIT\n")); 6655 IEM_ UPDATE_SVM_NRIP(pVCpu);6655 IEM_SVM_UPDATE_NRIP(pVCpu); 6656 6656 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_HLT, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 6657 6657 } … … 6704 6704 return rcStrict; 6705 6705 6706 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MONITOR))6706 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MONITOR)) 6707 6707 { 6708 6708 Log2(("monitor: Guest intercept -> #VMEXIT\n")); 6709 IEM_ UPDATE_SVM_NRIP(pVCpu);6709 IEM_SVM_UPDATE_NRIP(pVCpu); 6710 6710 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_MONITOR, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 6711 6711 } … … 6770 6770 * Check SVM nested-guest mwait intercepts. 6771 6771 */ 6772 if ( IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MWAIT_ARMED)6772 if ( IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MWAIT_ARMED) 6773 6773 && EMMonitorIsArmed(pVCpu)) 6774 6774 { 6775 6775 Log2(("mwait: Guest intercept (monitor hardware armed) -> #VMEXIT\n")); 6776 IEM_ UPDATE_SVM_NRIP(pVCpu);6776 IEM_SVM_UPDATE_NRIP(pVCpu); 6777 6777 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_MWAIT_ARMED, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 6778 6778 } 6779 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MWAIT))6779 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_MWAIT)) 6780 6780 { 6781 6781 Log2(("mwait: Guest intercept -> #VMEXIT\n")); 6782 IEM_ UPDATE_SVM_NRIP(pVCpu);6782 IEM_SVM_UPDATE_NRIP(pVCpu); 6783 6783 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_MWAIT, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 6784 6784 } … … 6828 6828 IEM_CIMPL_DEF_0(iemCImpl_cpuid) 6829 6829 { 6830 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_CPUID))6830 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_CPUID)) 6831 6831 { 6832 6832 Log2(("cpuid: Guest intercept -> #VMEXIT\n")); 6833 IEM_ UPDATE_SVM_NRIP(pVCpu);6833 IEM_SVM_UPDATE_NRIP(pVCpu); 6834 6834 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_CPUID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 6835 6835 } … … 7168 7168 if (pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE) 7169 7169 { 7170 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_XSETBV))7170 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_XSETBV)) 7171 7171 { 7172 7172 Log2(("xsetbv: Guest intercept -> #VMEXIT\n")); 7173 IEM_ UPDATE_SVM_NRIP(pVCpu);7173 IEM_SVM_UPDATE_NRIP(pVCpu); 7174 7174 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_XSETBV, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 7175 7175 } -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h
r72712 r74336 1208 1208 * Check SVM nested-guest IO intercept. 1209 1209 */ 1210 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT))1210 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 1211 1211 { 1212 1212 rcStrict = iemSvmHandleIOIntercept(pVCpu, pVCpu->cpum.GstCtx.dx, SVMIOIOTYPE_IN, OP_SIZE / 8, ADDR_SIZE, X86_SREG_ES, false /* fRep */, … … 1279 1279 * Check SVM nested-guest IO intercept. 1280 1280 */ 1281 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT))1281 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 1282 1282 { 1283 1283 rcStrict = iemSvmHandleIOIntercept(pVCpu, u16Port, SVMIOIOTYPE_IN, OP_SIZE / 8, ADDR_SIZE, X86_SREG_ES, true /* fRep */, … … 1480 1480 * Check SVM nested-guest IO intercept. 1481 1481 */ 1482 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT))1482 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 1483 1483 { 1484 1484 rcStrict = iemSvmHandleIOIntercept(pVCpu, pVCpu->cpum.GstCtx.dx, SVMIOIOTYPE_OUT, OP_SIZE / 8, ADDR_SIZE, iEffSeg, false /* fRep */, … … 1539 1539 * Check SVM nested-guest IO intercept. 1540 1540 */ 1541 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT))1541 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)) 1542 1542 { 1543 1543 rcStrict = iemSvmHandleIOIntercept(pVCpu, u16Port, SVMIOIOTYPE_OUT, OP_SIZE / 8, ADDR_SIZE, iEffSeg, true /* fRep */, -
trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp.h
r74332 r74336 884 884 if ( u8Vector == X86_XCPT_NMI 885 885 && (fFlags & IEM_XCPT_FLAGS_T_CPU_XCPT) 886 && IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_NMI))886 && IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_NMI)) 887 887 { 888 888 Log2(("iemHandleSvmNstGstEventIntercept: NMI intercept -> #VMEXIT\n")); … … 892 892 /* Check ICEBP intercept. */ 893 893 if ( (fFlags & IEM_XCPT_FLAGS_ICEBP_INSTR) 894 && IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_ICEBP))894 && IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_ICEBP)) 895 895 { 896 896 Log2(("iemHandleSvmNstGstEventIntercept: ICEBP intercept -> #VMEXIT\n")); 897 IEM_ UPDATE_SVM_NRIP(pVCpu);897 IEM_SVM_UPDATE_NRIP(pVCpu); 898 898 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_ICEBP, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 899 899 } … … 901 901 /* Check CPU exception intercepts. */ 902 902 if ( (fFlags & IEM_XCPT_FLAGS_T_CPU_XCPT) 903 && IEM_ IS_SVM_XCPT_INTERCEPT_SET(pVCpu, u8Vector))903 && IEM_SVM_IS_XCPT_INTERCEPT_SET(pVCpu, u8Vector)) 904 904 { 905 905 Assert(u8Vector <= X86_XCPT_LAST); … … 926 926 } 927 927 if (u8Vector == X86_XCPT_BR) 928 IEM_ UPDATE_SVM_NRIP(pVCpu);928 IEM_SVM_UPDATE_NRIP(pVCpu); 929 929 Log2(("iemHandleSvmNstGstEventIntercept: Xcpt intercept u32InterceptXcpt=%#RX32 u8Vector=%#x " 930 930 "uExitInfo1=%#RX64 uExitInfo2=%#RX64 -> #VMEXIT\n", pVCpu->cpum.GstCtx.hwvirt.svm.CTX_SUFF(pVmcb)->ctrl.u32InterceptXcpt, … … 938 938 | IEM_XCPT_FLAGS_ICEBP_INSTR 939 939 | IEM_XCPT_FLAGS_OF_INSTR)) == IEM_XCPT_FLAGS_T_SOFT_INT 940 && IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_INTN))940 && IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_INTN)) 941 941 { 942 942 uint64_t const uExitInfo1 = IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSvmDecodeAssists ? u8Vector : 0; 943 943 Log2(("iemHandleSvmNstGstEventIntercept: Software INT intercept (u8Vector=%#x) -> #VMEXIT\n", u8Vector)); 944 IEM_ UPDATE_SVM_NRIP(pVCpu);944 IEM_SVM_UPDATE_NRIP(pVCpu); 945 945 IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_SWINT, uExitInfo1, 0 /* uExitInfo2 */); 946 946 } … … 976 976 uint8_t cAddrSizeBits, uint8_t iEffSeg, bool fRep, bool fStrIo, uint8_t cbInstr) 977 977 { 978 Assert(IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT));978 Assert(IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_IOIO_PROT)); 979 979 Assert(cAddrSizeBits == 16 || cAddrSizeBits == 32 || cAddrSizeBits == 64); 980 980 Assert(cbReg == 1 || cbReg == 2 || cbReg == 4 || cbReg == 8); … … 989 989 { 990 990 Log3(("iemSvmHandleIOIntercept: u16Port=%#x (%u) -> #VMEXIT\n", u16Port, u16Port)); 991 IEM_ UPDATE_SVM_NRIP(pVCpu);991 IEM_SVM_UPDATE_NRIP(pVCpu); 992 992 return iemSvmVmexit(pVCpu, SVM_EXIT_IOIO, IoExitInfo.u, pVCpu->cpum.GstCtx.rip + cbInstr); 993 993 } … … 1048 1048 if (*pbMsrpm & RT_BIT(uMsrpmBit)) 1049 1049 { 1050 IEM_ UPDATE_SVM_NRIP(pVCpu);1050 IEM_SVM_UPDATE_NRIP(pVCpu); 1051 1051 return iemSvmVmexit(pVCpu, SVM_EXIT_MSR, uExitInfo1, 0 /* uExitInfo2 */); 1052 1052 } … … 1086 1086 } 1087 1087 1088 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMRUN))1088 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMRUN)) 1089 1089 { 1090 1090 Log(("vmrun: Guest intercept -> #VMEXIT\n")); … … 1124 1124 } 1125 1125 1126 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMLOAD))1126 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMLOAD)) 1127 1127 { 1128 1128 Log(("vmload: Guest intercept -> #VMEXIT\n")); … … 1179 1179 } 1180 1180 1181 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMSAVE))1181 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMSAVE)) 1182 1182 { 1183 1183 Log(("vmsave: Guest intercept -> #VMEXIT\n")); … … 1230 1230 LogFlow(("iemCImpl_clgi\n")); 1231 1231 IEM_CHECK_SVM_INSTR_COMMON(pVCpu, clgi); 1232 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_CLGI))1232 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_CLGI)) 1233 1233 { 1234 1234 Log(("clgi: Guest intercept -> #VMEXIT\n")); … … 1259 1259 LogFlow(("iemCImpl_stgi\n")); 1260 1260 IEM_CHECK_SVM_INSTR_COMMON(pVCpu, stgi); 1261 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_STGI))1261 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_STGI)) 1262 1262 { 1263 1263 Log2(("stgi: Guest intercept -> #VMEXIT\n")); … … 1290 1290 1291 1291 IEM_CHECK_SVM_INSTR_COMMON(pVCpu, invlpga); 1292 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_INVLPGA))1292 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_INVLPGA)) 1293 1293 { 1294 1294 Log2(("invlpga: Guest intercept (%RGp) -> #VMEXIT\n", GCPtrPage)); … … 1315 1315 return iemRaiseUndefinedOpcode(pVCpu); 1316 1316 1317 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_SKINIT))1317 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_SKINIT)) 1318 1318 { 1319 1319 Log2(("skinit: Guest intercept -> #VMEXIT\n")); … … 1355 1355 1356 1356 if (fCheckIntercept) 1357 IEM_ CHECK_SVM_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_PAUSE, SVM_EXIT_PAUSE, 0, 0);1357 IEM_SVM_CHECK_INSTR_INTERCEPT(pVCpu, SVM_CTRL_INTERCEPT_PAUSE, SVM_EXIT_PAUSE, 0, 0); 1358 1358 1359 1359 iemRegAddToRipAndClearRF(pVCpu, cbInstr); … … 1400 1400 IEM_CIMPL_DEF_0(iemCImpl_vmmcall) 1401 1401 { 1402 if (IEM_ IS_SVM_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMMCALL))1402 if (IEM_SVM_IS_CTRL_INTERCEPT_SET(pVCpu, SVM_CTRL_INTERCEPT_VMMCALL)) 1403 1403 { 1404 1404 Log(("vmmcall: Guest intercept -> #VMEXIT\n"));
Note:
See TracChangeset
for help on using the changeset viewer.