VirtualBox

Changeset 74336 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Sep 18, 2018 9:50:48 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested SVM: bugref:7243 SVM macro cleanup.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAll.cpp

    r74332 r74336  
    401401
    402402#else
    403 # define IEM_VMX_INSTR_COMMON_CHECKS(a_pVCpu, a_szInstr, a_InsDiagPrefix)  do { } while (0)
    404403# define IEM_IS_VMX_ENABLED(a_pVCpu)                         (false)
    405404# define IEM_IS_VMX_ROOT_MODE(a_pVCpu)                       (false)
     
    412411 * Check if an SVM control/instruction intercept is set.
    413412 */
    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)))
    415414
    416415/**
    417416 * Check if an SVM read CRx intercept is set.
    418417 */
    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)))
    420419
    421420/**
    422421 * Check if an SVM write CRx intercept is set.
    423422 */
    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)))
    425424
    426425/**
    427426 * Check if an SVM read DRx intercept is set.
    428427 */
    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)))
    430429
    431430/**
    432431 * Check if an SVM write DRx intercept is set.
    433432 */
    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)))
    435434
    436435/**
    437436 * Check if an SVM exception intercept is set.
    438437 */
    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)))
    440439
    441440/**
     
    464463 *  NRIP if needed.
    465464 */
    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) \
    467466    do \
    468467    { \
    469         if (IEM_IS_SVM_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept)) \
     468        if (IEM_SVM_IS_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept)) \
    470469        { \
    471             IEM_UPDATE_SVM_NRIP(a_pVCpu); \
     470            IEM_SVM_UPDATE_NRIP(a_pVCpu); \
    472471            IEM_SVM_VMEXIT_RET(a_pVCpu, a_uExitCode, a_uExitInfo1, a_uExitInfo2); \
    473472        } \
     
    475474
    476475/** 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) \
    478477    do \
    479478    { \
    480         if (!IEM_IS_SVM_READ_CR_INTERCEPT_SET(a_pVCpu, 0)) \
     479        if (!IEM_SVM_IS_READ_CR_INTERCEPT_SET(a_pVCpu, 0)) \
    481480        { /* probably likely */ } \
    482481        else \
    483482        { \
    484             IEM_UPDATE_SVM_NRIP(a_pVCpu); \
     483            IEM_SVM_UPDATE_NRIP(a_pVCpu); \
    485484            IEM_SVM_VMEXIT_RET(a_pVCpu, SVM_EXIT_READ_CR0, a_uExitInfo1, a_uExitInfo2); \
    486485        } \
     
    490489 * Updates the NextRIP (NRI) field in the nested-guest VMCB.
    491490 */
    492 # define IEM_UPDATE_SVM_NRIP(a_pVCpu) \
     491# define IEM_SVM_UPDATE_NRIP(a_pVCpu) \
    493492    do { \
    494493        if (IEM_GET_GUEST_CPU_FEATURES(a_pVCpu)->fSvmNextRipSave) \
     
    497496
    498497#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)
    505504# define IEM_SVM_VMEXIT_RET(a_pVCpu, a_uExitCode, a_uExitInfo1, a_uExitInfo2)             do { return VERR_SVM_IPE_1; } while (0)
    506505# 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)
    510509
    511510#endif
     
    34083407IEM_STATIC VBOXSTRICTRC iemInitiateCpuShutdown(PVMCPU pVCpu)
    34093408{
    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))
    34113410    {
    34123411        Log2(("shutdown: Guest intercept -> #VMEXIT\n"));
     
    39813980     * after validating the incoming (new) TSS, see AMD spec. 15.14.1 "Task Switch Intercept".
    39823981     */
    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))
    39843983    {
    39853984        uint32_t const uExitInfo1 = SelTSS;
     
    54975496            uErr     = 0;
    54985497            /* 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))
    55005499                IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_XCPT_DF, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    55015500        }
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h

    r74332 r74336  
    548548    VBOXSTRICTRC rcStrict;
    549549
    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))
    551551    {
    552552        Log2(("pushf: Guest intercept -> #VMEXIT\n"));
    553         IEM_UPDATE_SVM_NRIP(pVCpu);
     553        IEM_SVM_UPDATE_NRIP(pVCpu);
    554554        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_PUSHF, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    555555    }
     
    615615    uint32_t        fEflNew;
    616616
    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))
    618618    {
    619619        Log2(("popf: Guest intercept -> #VMEXIT\n"));
    620         IEM_UPDATE_SVM_NRIP(pVCpu);
     620        IEM_SVM_UPDATE_NRIP(pVCpu);
    621621        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_POPF, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    622622    }
     
    38533853     * see AMD spec. "15.9 Instruction Intercepts".
    38543854     */
    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))
    38563856    {
    38573857        Log(("iret: Guest intercept -> #VMEXIT\n"));
    3858         IEM_UPDATE_SVM_NRIP(pVCpu);
     3858        IEM_SVM_UPDATE_NRIP(pVCpu);
    38593859        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_IRET, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    38603860    }
     
    46324632    Assert(!pVCpu->cpum.GstCtx.eflags.Bits.u1VM);
    46334633
    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))
    46354635    {
    46364636        Log(("lgdt: Guest intercept -> #VMEXIT\n"));
    4637         IEM_UPDATE_SVM_NRIP(pVCpu);
     4637        IEM_SVM_UPDATE_NRIP(pVCpu);
    46384638        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_GDTR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    46394639    }
     
    46774677     *       you really must know.
    46784678     */
    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))
    46804680    {
    46814681        Log(("sgdt: Guest intercept -> #VMEXIT\n"));
    4682         IEM_UPDATE_SVM_NRIP(pVCpu);
     4682        IEM_SVM_UPDATE_NRIP(pVCpu);
    46834683        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_GDTR_READ, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    46844684    }
     
    47054705    Assert(!pVCpu->cpum.GstCtx.eflags.Bits.u1VM);
    47064706
    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))
    47084708    {
    47094709        Log(("lidt: Guest intercept -> #VMEXIT\n"));
    4710         IEM_UPDATE_SVM_NRIP(pVCpu);
     4710        IEM_SVM_UPDATE_NRIP(pVCpu);
    47114711        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_IDTR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    47124712    }
     
    47494749     *       you really must know.
    47504750     */
    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))
    47524752    {
    47534753        Log(("sidt: Guest intercept -> #VMEXIT\n"));
    4754         IEM_UPDATE_SVM_NRIP(pVCpu);
     4754        IEM_SVM_UPDATE_NRIP(pVCpu);
    47554755        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_IDTR_READ, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    47564756    }
     
    47964796    {
    47974797        /* 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))
    47994799        {
    48004800            Log(("lldt: Guest intercept -> #VMEXIT\n"));
    4801             IEM_UPDATE_SVM_NRIP(pVCpu);
     4801            IEM_SVM_UPDATE_NRIP(pVCpu);
    48024802            IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_LDTR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    48034803        }
     
    48724872
    48734873    /* 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))
    48754875    {
    48764876        Log(("lldt: Guest intercept -> #VMEXIT\n"));
    4877         IEM_UPDATE_SVM_NRIP(pVCpu);
     4877        IEM_SVM_UPDATE_NRIP(pVCpu);
    48784878        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_LDTR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    48794879    }
     
    49034903IEM_CIMPL_DEF_2(iemCImpl_sldt_reg, uint8_t, iGReg, uint8_t, enmEffOpSize)
    49044904{
    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);
    49064906
    49074907    IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_LDTR);
     
    49274927IEM_CIMPL_DEF_2(iemCImpl_sldt_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst)
    49284928{
    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);
    49304930
    49314931    IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_LDTR);
     
    49674967        return iemRaiseGeneralProtectionFault0(pVCpu);
    49684968    }
    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))
    49704970    {
    49714971        Log(("ltr: Guest intercept -> #VMEXIT\n"));
    4972         IEM_UPDATE_SVM_NRIP(pVCpu);
     4972        IEM_SVM_UPDATE_NRIP(pVCpu);
    49734973        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_TR_WRITE, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    49744974    }
     
    50685068IEM_CIMPL_DEF_2(iemCImpl_str_reg, uint8_t, iGReg, uint8_t, enmEffOpSize)
    50695069{
    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);
    50715071
    50725072    IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_TR);
     
    50925092IEM_CIMPL_DEF_2(iemCImpl_str_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst)
    50935093{
    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);
    50955095
    50965096    IEM_CTX_IMPORT_RET(pVCpu, CPUMCTX_EXTRN_TR);
     
    51145114    Assert(!pVCpu->cpum.GstCtx.eflags.Bits.u1VM);
    51155115
    5116     if (IEM_IS_SVM_READ_CR_INTERCEPT_SET(pVCpu, iCrReg))
     5116    if (IEM_SVM_IS_READ_CR_INTERCEPT_SET(pVCpu, iCrReg))
    51175117    {
    51185118        Log(("iemCImpl_mov_Rd_Cd: Guest intercept CR%u -> #VMEXIT\n", iCrReg));
    5119         IEM_UPDATE_SVM_NRIP(pVCpu);
     5119        IEM_SVM_UPDATE_NRIP(pVCpu);
    51205120        IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_READ_CR0 + iCrReg, IEMACCESSCRX_MOV_CRX, iGReg);
    51215121    }
     
    51875187IEM_CIMPL_DEF_2(iemCImpl_smsw_reg, uint8_t, iGReg, uint8_t, enmEffOpSize)
    51885188{
    5189     IEM_CHECK_SVM_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
     5189    IEM_SVM_CHECK_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    51905190
    51915191    switch (enmEffOpSize)
     
    52255225IEM_CIMPL_DEF_2(iemCImpl_smsw_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst)
    52265226{
    5227     IEM_CHECK_SVM_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
     5227    IEM_SVM_CHECK_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    52285228
    52295229    uint16_t u16Value;
     
    53525352             * SVM nested-guest CR0 write intercepts.
    53535353             */
    5354             if (IEM_IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, iCrReg))
     5354            if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, iCrReg))
    53555355            {
    53565356                Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg));
    5357                 IEM_UPDATE_SVM_NRIP(pVCpu);
     5357                IEM_SVM_UPDATE_NRIP(pVCpu);
    53585358                IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR0, enmAccessCrX, iGReg);
    53595359            }
    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))
    53615361            {
    53625362                /* 'lmsw' intercepts regardless of whether the TS/MP bits are actually toggled. */
     
    53665366                    Assert(enmAccessCrX != IEMACCESSCRX_CLTS);
    53675367                    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);
    53695369                    IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_CR0_SEL_WRITE, enmAccessCrX, iGReg);
    53705370                }
     
    54205420        case 2:
    54215421        {
    5422             if (IEM_IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 2))
     5422            if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 2))
    54235423            {
    54245424                Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg));
    5425                 IEM_UPDATE_SVM_NRIP(pVCpu);
     5425                IEM_SVM_UPDATE_NRIP(pVCpu);
    54265426                IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR2, enmAccessCrX, iGReg);
    54275427            }
     
    54765476            }
    54775477
    5478             if (IEM_IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 3))
     5478            if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 3))
    54795479            {
    54805480                Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg));
    5481                 IEM_UPDATE_SVM_NRIP(pVCpu);
     5481                IEM_SVM_UPDATE_NRIP(pVCpu);
    54825482                IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR3, enmAccessCrX, iGReg);
    54835483            }
     
    55555555            }
    55565556
    5557             if (IEM_IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 4))
     5557            if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 4))
    55585558            {
    55595559                Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg));
    5560                 IEM_UPDATE_SVM_NRIP(pVCpu);
     5560                IEM_SVM_UPDATE_NRIP(pVCpu);
    55615561                IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR4, enmAccessCrX, iGReg);
    55625562            }
     
    56205620            if (CPUMIsGuestInSvmNestedHwVirtMode(IEM_GET_CTX(pVCpu)))
    56215621            {
    5622                 if (IEM_IS_SVM_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 8))
     5622                if (IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(pVCpu, /*cr*/ 8))
    56235623                {
    56245624                    Log(("iemCImpl_load_Cr%#x: Guest intercept -> #VMEXIT\n", iCrReg));
    5625                     IEM_UPDATE_SVM_NRIP(pVCpu);
     5625                    IEM_SVM_UPDATE_NRIP(pVCpu);
    56265626                    IEM_SVM_CRX_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_CR8, enmAccessCrX, iGReg);
    56275627                }
     
    57945794     * Check for any SVM nested-guest intercepts for the DRx read.
    57955795     */
    5796     if (IEM_IS_SVM_READ_DR_INTERCEPT_SET(pVCpu, iDrReg))
     5796    if (IEM_SVM_IS_READ_DR_INTERCEPT_SET(pVCpu, iDrReg))
    57975797    {
    57985798        Log(("mov r%u,dr%u: Guest intercept -> #VMEXIT\n", iGReg, iDrReg));
    5799         IEM_UPDATE_SVM_NRIP(pVCpu);
     5799        IEM_SVM_UPDATE_NRIP(pVCpu);
    58005800        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_READ_DR0 + (iDrReg & 0xf),
    58015801                              IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSvmDecodeAssists ? (iGReg & 7) : 0, 0 /* uExitInfo2 */);
     
    58955895     * Check for any SVM nested-guest intercepts for the DRx write.
    58965896     */
    5897     if (IEM_IS_SVM_WRITE_DR_INTERCEPT_SET(pVCpu, iDrReg))
     5897    if (IEM_SVM_IS_WRITE_DR_INTERCEPT_SET(pVCpu, iDrReg))
    58985898    {
    58995899        Log2(("mov dr%u,r%u: Guest intercept -> #VMEXIT\n", iDrReg, iGReg));
    5900         IEM_UPDATE_SVM_NRIP(pVCpu);
     5900        IEM_SVM_UPDATE_NRIP(pVCpu);
    59015901        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_WRITE_DR0 + (iDrReg & 0xf),
    59025902                              IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSvmDecodeAssists ? (iGReg & 7) : 0, 0 /* uExitInfo2 */);
     
    59335933    IEM_CTX_ASSERT(pVCpu, CPUMCTX_EXTRN_CR0 | CPUMCTX_EXTRN_CR3 | CPUMCTX_EXTRN_CR4 | CPUMCTX_EXTRN_EFER);
    59345934
    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))
    59365936    {
    59375937        Log(("invlpg: Guest intercept (%RGp) -> #VMEXIT\n", GCPtrPage));
    5938         IEM_UPDATE_SVM_NRIP(pVCpu);
     5938        IEM_SVM_UPDATE_NRIP(pVCpu);
    59395939        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_INVLPG,
    59405940                              IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSvmDecodeAssists ? GCPtrPage : 0, 0 /* uExitInfo2 */);
     
    60716071    }
    60726072
    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);
    60746074
    60756075    /* We currently take no action here. */
     
    60906090    }
    60916091
    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);
    60936093
    60946094    /* We currently take no action here. */
     
    61016101IEM_CIMPL_DEF_0(iemCImpl_rsm)
    61026102{
    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);
    61046104    NOREF(cbInstr);
    61056105    return iemRaiseUndefinedOpcode(pVCpu);
     
    61286128    }
    61296129
    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))
    61316131    {
    61326132        Log(("rdtsc: Guest intercept -> #VMEXIT\n"));
    6133         IEM_UPDATE_SVM_NRIP(pVCpu);
     6133        IEM_SVM_UPDATE_NRIP(pVCpu);
    61346134        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_RDTSC, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    61356135    }
     
    61716171    }
    61726172
    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))
    61746174    {
    61756175        Log(("rdtscp: Guest intercept -> #VMEXIT\n"));
    6176         IEM_UPDATE_SVM_NRIP(pVCpu);
     6176        IEM_SVM_UPDATE_NRIP(pVCpu);
    61776177        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_RDTSCP, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    61786178    }
     
    62136213        return iemRaiseGeneralProtectionFault0(pVCpu);
    62146214
    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))
    62166216    {
    62176217        Log(("rdpmc: Guest intercept -> #VMEXIT\n"));
    6218         IEM_UPDATE_SVM_NRIP(pVCpu);
     6218        IEM_SVM_UPDATE_NRIP(pVCpu);
    62196219        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_RDPMC, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    62206220    }
     
    62516251    VBOXSTRICTRC rcStrict;
    62526252#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))
    62546254    {
    62556255        rcStrict = iemSvmHandleMsrIntercept(pVCpu, pVCpu->cpum.GstCtx.ecx, false /* fWrite */);
     
    63226322    VBOXSTRICTRC rcStrict;
    63236323#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))
    63256325    {
    63266326        rcStrict = iemSvmHandleMsrIntercept(pVCpu, pVCpu->cpum.GstCtx.ecx, true /* fWrite */);
     
    63866386     */
    63876387#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))
    63896389    {
    63906390        uint8_t cAddrSizeBits;
     
    64796479     */
    64806480#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))
    64826482    {
    64836483        uint8_t cAddrSizeBits;
     
    66506650        return iemRaiseGeneralProtectionFault0(pVCpu);
    66516651
    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))
    66536653    {
    66546654        Log2(("hlt: Guest intercept -> #VMEXIT\n"));
    6655         IEM_UPDATE_SVM_NRIP(pVCpu);
     6655        IEM_SVM_UPDATE_NRIP(pVCpu);
    66566656        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_HLT, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    66576657    }
     
    67046704        return rcStrict;
    67056705
    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))
    67076707    {
    67086708        Log2(("monitor: Guest intercept -> #VMEXIT\n"));
    6709         IEM_UPDATE_SVM_NRIP(pVCpu);
     6709        IEM_SVM_UPDATE_NRIP(pVCpu);
    67106710        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_MONITOR, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    67116711    }
     
    67706770     * Check SVM nested-guest mwait intercepts.
    67716771     */
    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)
    67736773        && EMMonitorIsArmed(pVCpu))
    67746774    {
    67756775        Log2(("mwait: Guest intercept (monitor hardware armed) -> #VMEXIT\n"));
    6776         IEM_UPDATE_SVM_NRIP(pVCpu);
     6776        IEM_SVM_UPDATE_NRIP(pVCpu);
    67776777        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_MWAIT_ARMED, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    67786778    }
    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))
    67806780    {
    67816781        Log2(("mwait: Guest intercept -> #VMEXIT\n"));
    6782         IEM_UPDATE_SVM_NRIP(pVCpu);
     6782        IEM_SVM_UPDATE_NRIP(pVCpu);
    67836783        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_MWAIT, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    67846784    }
     
    68286828IEM_CIMPL_DEF_0(iemCImpl_cpuid)
    68296829{
    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))
    68316831    {
    68326832        Log2(("cpuid: Guest intercept -> #VMEXIT\n"));
    6833         IEM_UPDATE_SVM_NRIP(pVCpu);
     6833        IEM_SVM_UPDATE_NRIP(pVCpu);
    68346834        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_CPUID, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    68356835    }
     
    71687168    if (pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE)
    71697169    {
    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))
    71717171        {
    71727172            Log2(("xsetbv: Guest intercept -> #VMEXIT\n"));
    7173             IEM_UPDATE_SVM_NRIP(pVCpu);
     7173            IEM_SVM_UPDATE_NRIP(pVCpu);
    71747174            IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_XSETBV, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    71757175        }
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplStrInstr.cpp.h

    r72712 r74336  
    12081208     * Check SVM nested-guest IO intercept.
    12091209     */
    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))
    12111211    {
    12121212        rcStrict = iemSvmHandleIOIntercept(pVCpu, pVCpu->cpum.GstCtx.dx, SVMIOIOTYPE_IN, OP_SIZE / 8, ADDR_SIZE, X86_SREG_ES, false /* fRep */,
     
    12791279     * Check SVM nested-guest IO intercept.
    12801280     */
    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))
    12821282    {
    12831283        rcStrict = iemSvmHandleIOIntercept(pVCpu, u16Port, SVMIOIOTYPE_IN, OP_SIZE / 8, ADDR_SIZE, X86_SREG_ES, true /* fRep */,
     
    14801480     * Check SVM nested-guest IO intercept.
    14811481     */
    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))
    14831483    {
    14841484        rcStrict = iemSvmHandleIOIntercept(pVCpu, pVCpu->cpum.GstCtx.dx, SVMIOIOTYPE_OUT, OP_SIZE / 8, ADDR_SIZE, iEffSeg, false /* fRep */,
     
    15391539     * Check SVM nested-guest IO intercept.
    15401540     */
    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))
    15421542    {
    15431543        rcStrict = iemSvmHandleIOIntercept(pVCpu, u16Port, SVMIOIOTYPE_OUT, OP_SIZE / 8, ADDR_SIZE, iEffSeg, true /* fRep */,
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplSvmInstr.cpp.h

    r74332 r74336  
    884884    if (   u8Vector == X86_XCPT_NMI
    885885        && (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))
    887887    {
    888888        Log2(("iemHandleSvmNstGstEventIntercept: NMI intercept -> #VMEXIT\n"));
     
    892892    /* Check ICEBP intercept. */
    893893    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))
    895895    {
    896896        Log2(("iemHandleSvmNstGstEventIntercept: ICEBP intercept -> #VMEXIT\n"));
    897         IEM_UPDATE_SVM_NRIP(pVCpu);
     897        IEM_SVM_UPDATE_NRIP(pVCpu);
    898898        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_ICEBP, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */);
    899899    }
     
    901901    /* Check CPU exception intercepts. */
    902902    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))
    904904    {
    905905        Assert(u8Vector <= X86_XCPT_LAST);
     
    926926        }
    927927        if (u8Vector == X86_XCPT_BR)
    928             IEM_UPDATE_SVM_NRIP(pVCpu);
     928            IEM_SVM_UPDATE_NRIP(pVCpu);
    929929        Log2(("iemHandleSvmNstGstEventIntercept: Xcpt intercept u32InterceptXcpt=%#RX32 u8Vector=%#x "
    930930              "uExitInfo1=%#RX64 uExitInfo2=%#RX64 -> #VMEXIT\n", pVCpu->cpum.GstCtx.hwvirt.svm.CTX_SUFF(pVmcb)->ctrl.u32InterceptXcpt,
     
    938938                      | IEM_XCPT_FLAGS_ICEBP_INSTR
    939939                      | 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))
    941941    {
    942942        uint64_t const uExitInfo1 = IEM_GET_GUEST_CPU_FEATURES(pVCpu)->fSvmDecodeAssists ? u8Vector : 0;
    943943        Log2(("iemHandleSvmNstGstEventIntercept: Software INT intercept (u8Vector=%#x) -> #VMEXIT\n", u8Vector));
    944         IEM_UPDATE_SVM_NRIP(pVCpu);
     944        IEM_SVM_UPDATE_NRIP(pVCpu);
    945945        IEM_SVM_VMEXIT_RET(pVCpu, SVM_EXIT_SWINT, uExitInfo1, 0 /* uExitInfo2 */);
    946946    }
     
    976976                                                uint8_t cAddrSizeBits, uint8_t iEffSeg, bool fRep, bool fStrIo, uint8_t cbInstr)
    977977{
    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));
    979979    Assert(cAddrSizeBits == 16 || cAddrSizeBits == 32 || cAddrSizeBits == 64);
    980980    Assert(cbReg == 1 || cbReg == 2 || cbReg == 4 || cbReg == 8);
     
    989989    {
    990990        Log3(("iemSvmHandleIOIntercept: u16Port=%#x (%u) -> #VMEXIT\n", u16Port, u16Port));
    991         IEM_UPDATE_SVM_NRIP(pVCpu);
     991        IEM_SVM_UPDATE_NRIP(pVCpu);
    992992        return iemSvmVmexit(pVCpu, SVM_EXIT_IOIO, IoExitInfo.u, pVCpu->cpum.GstCtx.rip + cbInstr);
    993993    }
     
    10481048        if (*pbMsrpm & RT_BIT(uMsrpmBit))
    10491049        {
    1050             IEM_UPDATE_SVM_NRIP(pVCpu);
     1050            IEM_SVM_UPDATE_NRIP(pVCpu);
    10511051            return iemSvmVmexit(pVCpu, SVM_EXIT_MSR, uExitInfo1, 0 /* uExitInfo2 */);
    10521052        }
     
    10861086    }
    10871087
    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))
    10891089    {
    10901090        Log(("vmrun: Guest intercept -> #VMEXIT\n"));
     
    11241124    }
    11251125
    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))
    11271127    {
    11281128        Log(("vmload: Guest intercept -> #VMEXIT\n"));
     
    11791179    }
    11801180
    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))
    11821182    {
    11831183        Log(("vmsave: Guest intercept -> #VMEXIT\n"));
     
    12301230    LogFlow(("iemCImpl_clgi\n"));
    12311231    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))
    12331233    {
    12341234        Log(("clgi: Guest intercept -> #VMEXIT\n"));
     
    12591259    LogFlow(("iemCImpl_stgi\n"));
    12601260    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))
    12621262    {
    12631263        Log2(("stgi: Guest intercept -> #VMEXIT\n"));
     
    12901290
    12911291    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))
    12931293    {
    12941294        Log2(("invlpga: Guest intercept (%RGp) -> #VMEXIT\n", GCPtrPage));
     
    13151315        return iemRaiseUndefinedOpcode(pVCpu);
    13161316
    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))
    13181318    {
    13191319        Log2(("skinit: Guest intercept -> #VMEXIT\n"));
     
    13551355
    13561356    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);
    13581358
    13591359    iemRegAddToRipAndClearRF(pVCpu, cbInstr);
     
    14001400IEM_CIMPL_DEF_0(iemCImpl_vmmcall)
    14011401{
    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))
    14031403    {
    14041404        Log(("vmmcall: Guest intercept -> #VMEXIT\n"));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette