VirtualBox

Changeset 42840 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Aug 16, 2012 10:17:58 AM (12 years ago)
Author:
vboxsync
Message:

VMM/HWSVMR0: nits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r42402 r42840  
    164164    pVM->hwaccm.s.svm.pIOBitmapPhys = RTR0MemObjGetPagePhysAddr(pVM->hwaccm.s.svm.pMemObjIOBitmap, 0);
    165165    /* Set all bits to intercept all IO accesses. */
    166     ASMMemFill32(pVM->hwaccm.s.svm.pIOBitmap, PAGE_SIZE*3, 0xffffffff);
     166    ASMMemFill32(pVM->hwaccm.s.svm.pIOBitmap, 3 << PAGE_SHIFT, 0xffffffff);
    167167
    168168    /*
     
    234234        pVCpu->hwaccm.s.svm.pMSRBitmapPhys = RTR0MemObjGetPagePhysAddr(pVCpu->hwaccm.s.svm.pMemObjMSRBitmap, 0);
    235235        /* Set all bits to intercept all MSR accesses. */
    236         ASMMemFill32(pVCpu->hwaccm.s.svm.pMSRBitmap, PAGE_SIZE * 2, 0xffffffff);
     236        ASMMemFill32(pVCpu->hwaccm.s.svm.pMSRBitmap, 2 << PAGE_SHIFT, 0xffffffff);
    237237    }
    238238
     
    11711171    STAM_PROFILE_ADV_SET_STOPPED(&pVCpu->hwaccm.s.StatExit2);
    11721172
    1173     VBOXSTRICTRC rc = VINF_SUCCESS;
    1174     int         rc2;
    1175     uint64_t    exitCode    = (uint64_t)SVM_EXIT_INVALID;
    1176     SVM_VMCB   *pVMCB       = NULL;
    1177     bool        fSyncTPR    = false;
    1178     unsigned    cResume     = 0;
    1179     uint8_t     u8LastTPR   = 0; /* Initialized for potentially stupid compilers. */
    1180     uint32_t    u32HostExtFeatures = 0;
     1173    VBOXSTRICTRC    rc = VINF_SUCCESS;
     1174    int             rc2;
     1175    uint64_t        exitCode    = (uint64_t)SVM_EXIT_INVALID;
     1176    SVM_VMCB       *pVMCB       = NULL;
     1177    bool            fSyncTPR    = false;
     1178    unsigned        cResume     = 0;
     1179    uint8_t         u8LastTPR   = 0; /* Initialized for potentially stupid compilers. */
     1180    uint32_t        u32HostExtFeatures = 0;
    11811181    PHMGLOBLCPUINFO pCpu    = 0;
    1182     RTCCUINTREG uOldEFlags  = ~(RTCCUINTREG)0;
     1182    RTCCUINTREG     uOldEFlags  = ~(RTCCUINTREG)0;
    11831183#ifdef VBOX_STRICT
    1184     RTCPUID     idCpuCheck;
     1184    RTCPUID         idCpuCheck;
    11851185#endif
    11861186#ifdef VBOX_HIGH_RES_TIMERS_HACK_IN_RING0
    1187     uint64_t    u64LastTime = RTTimeMilliTS();
     1187    uint64_t        u64LastTime = RTTimeMilliTS();
    11881188#endif
    11891189
     
    14561456     * RDTSCPs (that don't cause exits) reads the guest MSR. See @bugref{3324}.
    14571457     */
    1458     u32HostExtFeatures = ASMCpuId_EDX(0x80000001);  /** @todo Move this elsewhere, not needed on every world switch */
     1458    u32HostExtFeatures = pVM->hwaccm.s.cpuid.u32AMDFeatureEDX;
    14591459    if (    (u32HostExtFeatures & X86_CPUID_EXT_FEATURE_EDX_RDTSCP)
    14601460        && !(pVMCB->ctrl.u32InterceptCtrl2 & SVM_CTRL2_INTERCEPT_RDTSCP))
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