VirtualBox

Changeset 68784 in vbox


Ignore:
Timestamp:
Sep 18, 2017 4:07:33 PM (7 years ago)
Author:
vboxsync
Message:

VMM/IEM: SVM instruction nits.

File:
1 edited

Legend:

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

    r68362 r68784  
    105105         * Disable the global interrupt flag to prevent interrupts during the 'atomic' world switch.
    106106         */
    107         pCtx->hwvirt.svm.fGif = 0;
     107        pCtx->hwvirt.svm.fGif = false;
    108108
    109109        Assert(CPUMSELREG_ARE_HIDDEN_PARTS_VALID(pVCpu, &pCtx->es));
     
    219219        Assert(!CPUMIsGuestInSvmNestedHwVirtMode(pCtx));
    220220
     221        /*
     222         * Restore the subset of force-flags that were preserved.
     223         */
     224        if (pCtx->hwvirt.fLocalForcedActions)
     225        {
     226            VMCPU_FF_SET(pVCpu, pCtx->hwvirt.fLocalForcedActions);
     227            pCtx->hwvirt.fLocalForcedActions = 0;
     228        }
     229
    221230        if (RT_SUCCESS(rcStrict))
    222231        {
     
    490499         */
    491500        pCtx->hwvirt.fLocalForcedActions = pVCpu->fLocalForcedActions & VMCPU_FF_BLOCK_NMIS;
     501        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_BLOCK_NMIS);
    492502
    493503        /*
     
    566576         * Clear global interrupt flags to allow interrupts in the guest.
    567577         */
    568         pCtx->hwvirt.svm.fGif = 1;
     578        pCtx->hwvirt.svm.fGif = true;
    569579
    570580        /*
     
    10161026    IEM_SVM_INSTR_COMMON_CHECKS(pVCpu, vmrun);
    10171027
    1018     RTGCPHYS const GCPhysVmcb = pVCpu->iem.s.enmEffAddrMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax;
     1028    /** @todo Check effective address size using address size prefix. */
     1029    RTGCPHYS const GCPhysVmcb = pVCpu->iem.s.enmCpuMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax;
    10191030    if (   (GCPhysVmcb & X86_PAGE_4K_OFFSET_MASK)
    10201031        || !PGMPhysIsGCPhysNormal(pVCpu->CTX_SUFF(pVM), GCPhysVmcb))
     
    10791090    IEM_SVM_INSTR_COMMON_CHECKS(pVCpu, vmload);
    10801091
    1081     RTGCPHYS const GCPhysVmcb = pVCpu->iem.s.enmEffAddrMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax;
     1092    /** @todo Check effective address size using address size prefix. */
     1093    RTGCPHYS const GCPhysVmcb = pVCpu->iem.s.enmCpuMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax;
    10821094    if (   (GCPhysVmcb & X86_PAGE_4K_OFFSET_MASK)
    10831095        || !PGMPhysIsGCPhysNormal(pVCpu->CTX_SUFF(pVM), GCPhysVmcb))
     
    11341146    IEM_SVM_INSTR_COMMON_CHECKS(pVCpu, vmsave);
    11351147
    1136     RTGCPHYS const GCPhysVmcb = pVCpu->iem.s.enmEffAddrMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax;
     1148    /** @todo Check effective address size using address size prefix. */
     1149    RTGCPHYS const GCPhysVmcb = pVCpu->iem.s.enmCpuMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax;
    11371150    if (   (GCPhysVmcb & X86_PAGE_4K_OFFSET_MASK)
    11381151        || !PGMPhysIsGCPhysNormal(pVCpu->CTX_SUFF(pVM), GCPhysVmcb))
     
    11971210    }
    11981211
    1199     pCtx->hwvirt.svm.fGif = 0;
     1212    pCtx->hwvirt.svm.fGif = false;
    12001213    iemRegAddToRipAndClearRF(pVCpu, cbInstr);
    12011214
     
    12271240    }
    12281241
    1229     pCtx->hwvirt.svm.fGif = 1;
     1242    pCtx->hwvirt.svm.fGif = true;
    12301243    iemRegAddToRipAndClearRF(pVCpu, cbInstr);
    12311244
     
    12451258{
    12461259    PCPUMCTX pCtx = IEM_GET_CTX(pVCpu);
    1247     RTGCPTR  const GCPtrPage = pVCpu->iem.s.enmEffAddrMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax;
     1260    /** @todo Check effective address size using address size prefix. */
     1261    RTGCPTR  const GCPtrPage = pVCpu->iem.s.enmCpuMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax;
    12481262    /** @todo PGM needs virtual ASID support. */
    12491263#if 0
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