VirtualBox

Changeset 19679 in vbox for trunk


Ignore:
Timestamp:
May 14, 2009 8:34:39 AM (16 years ago)
Author:
vboxsync
Message:

Fixed wrong usage of HWACCMR3IsActive.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/hwaccm.h

    r19227 r19679  
    127127VMMR3DECL(void) HWACCMR3NotifyScheduled(PVMCPU pVCpu);
    128128VMMR3DECL(void) HWACCMR3NotifyEmulated(PVMCPU pVCpu);
    129 VMMR3DECL(bool) HWACCMR3IsActive(PVM pVM);
     129VMMR3DECL(bool) HWACCMR3IsActive(PVMCPU pVCpu);
    130130VMMR3DECL(bool) HWACCMR3IsNestedPagingActive(PVM pVM);
    131131VMMR3DECL(bool) HWACCMR3IsAllowed(PVM pVM);
  • trunk/src/VBox/VMM/EM.cpp

    r19660 r19679  
    16161616     * Traps can be directly forwarded in hardware accelerated mode.
    16171617     */
    1618     if (HWACCMR3IsActive(pVM))
     1618    if (HWACCMIsEnabled(pVM))
    16191619    {
    16201620#ifdef LOGGING_ENABLED
     
    34883488                VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS);
    34893489            }
    3490             if (HWACCMR3IsActive(pVM))
     3490            if (HWACCMR3IsActive(pVCpu))
    34913491                rc2 = VINF_EM_RESCHEDULE_HWACC;
    34923492            else
  • trunk/src/VBox/VMM/HWACCM.cpp

    r19326 r19679  
    178178    pVM->hwaccm.s.svm.fEnabled   = false;
    179179
    180     pVM->hwaccm.s.fActive        = false;
    181180    pVM->hwaccm.s.fNestedPaging  = false;
    182181
     
    248247{
    249248    LogFlow(("HWACCMR3InitCPU\n"));
     249
     250    for (unsigned i=0;i<pVM->cCPUs;i++)
     251    {
     252        PVMCPU pVCpu = &pVM->aCpus[i];
     253
     254        pVCpu->hwaccm.s.fActive = false;
     255    }
    250256
    251257#ifdef VBOX_WITH_STATISTICS
     
    11781184        pVCpu->hwaccm.s.vmx.cr4_mask = 0;
    11791185
     1186        pVCpu->hwaccm.s.fActive        = false;
    11801187        pVCpu->hwaccm.s.Event.fPending = false;
    11811188
     
    12491256    if (pVM->hwaccm.s.svm.fEnabled)
    12501257    {
    1251         pVM->hwaccm.s.fActive = true;
     1258        pVCpu->hwaccm.s.fActive = true;
    12521259        return true;
    12531260    }
    12541261
    1255     pVM->hwaccm.s.fActive = false;
     1262    pVCpu->hwaccm.s.fActive = false;
    12561263
    12571264    /* Note! The context supplied by REM is partial. If we add more checks here, be sure to verify that REM provides this info! */
     
    13781385            return false;
    13791386
    1380         pVM->hwaccm.s.fActive = true;
     1387        pVCpu->hwaccm.s.fActive = true;
    13811388        return true;
    13821389    }
     
    14101417 *
    14111418 * @returns boolean
    1412  * @param   pVM         The VM to operate on.
    1413  */
    1414 VMMR3DECL(bool) HWACCMR3IsActive(PVM pVM)
    1415 {
    1416     return pVM->hwaccm.s.fActive;
     1419 * @param   pVCpu        The VMCPU to operate on.
     1420 */
     1421VMMR3DECL(bool) HWACCMR3IsActive(PVMCPU pVCpu)
     1422{
     1423    return pVCpu->hwaccm.s.fActive;
    14171424}
    14181425
  • trunk/src/VBox/VMM/HWACCMInternal.h

    r19337 r19679  
    190190    bool                        fInitialized;
    191191
    192     /** Set when we're using VMX/SVN at that moment. */
    193     bool                        fActive;
    194 
    195192    /** Set when hardware acceleration is allowed. */
    196193    bool                        fAllowed;
     
    210207    /** Explicit alignment padding to make 32-bit gcc align u64RegisterMask
    211208     *  naturally. */
    212     bool                        padding[1];
     209    bool                        padding[2];
    213210
    214211    /** And mask for copying register contents. */
     
    463460    bool                        fForceTLBFlush;
    464461
    465     /** Explicit alignment padding to make 32-bit gcc align u64RegisterMask
    466      *  naturally. */
    467     bool                        padding[1];
     462    /** Set when we're using VT-x or AMD-V at that moment. */
     463    bool                        fActive;
    468464
    469465    /** HWACCM_CHANGED_* flags. */
  • trunk/src/VBox/VMM/PGMMap.cpp

    r19141 r19679  
    517517    /* Ignore the additions mapping fix call in VT-x/AMD-V. */
    518518    if (    pVM->pgm.s.fMappingsFixed
    519         &&  HWACCMR3IsActive(pVM))
     519        &&  HWACCMIsEnabled(pVM))
    520520        return VINF_SUCCESS;
    521521
     
    710710
    711711    /* Ignore in VT-x/AMD-V mode. */
    712     if (HWACCMR3IsActive(pVM))
     712    if (HWACCMIsEnabled(pVM))
    713713        return VINF_SUCCESS;
    714714
  • trunk/src/VBox/VMM/TRPM.cpp

    r19639 r19679  
    14591459        if (RT_SUCCESS(rc))
    14601460        {
    1461             if (HWACCMR3IsActive(pVM))
     1461            if (HWACCMIsEnabled(pVM))
    14621462            {
    14631463                rc = TRPMAssertTrap(pVCpu, u8Interrupt, enmEvent);
  • trunk/src/VBox/VMM/VMMGuruMeditation.cpp

    r19585 r19679  
    266266            RTGCUINTPTR     uCR2       = 0xdeadface;
    267267            int rc2 = TRPMQueryTrapAll(pVCpu, &u8TrapNo, &enmType, &uErrorCode, &uCR2);
    268             if (!HWACCMR3IsActive(pVM))
     268            if (!HWACCMIsEnabled(pVM))
    269269            {
    270270                if (RT_SUCCESS(rc2))
     
    285285             * The hypervisor dump is not relevant when we're in VT-x/AMD-V mode.
    286286             */
    287             if (HWACCMR3IsActive(pVM))
     287            if (HWACCMIsEnabled(pVM))
    288288            {
    289289                pHlp->pfnPrintf(pHlp, "\n");
     
    449449                                pVCpu->vmm.s.pbEMTStackRC, pVCpu->vmm.s.pbEMTStackBottomRC,
    450450                                VMM_STACK_SIZE, pVCpu->vmm.s.pbEMTStackR3);
    451             } /* !HWACCMR3IsActive */
     451            } /* !HWACCMIsEnabled */
    452452            break;
    453453        }
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