VirtualBox

Ignore:
Timestamp:
Jan 5, 2009 12:15:28 PM (16 years ago)
Author:
vboxsync
Message:

Redid r41365.

File:
1 edited

Legend:

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

    r15789 r15797  
    849849
    850850    RTCCUINTREG     fFlags = ASMIntDisableFlags();
    851     RTCPUID         idCpu = RTMpCpuId();
    852     PHWACCM_CPUINFO pCpu = &HWACCMR0Globals.aCpuInfo[idCpu];
    853 
     851    PHWACCM_CPUINFO pCpu = HWACCMR0GetCurrentCpu();
     852
     853    /* @note Not correct as we can be rescheduled to a different cpu, but the fInUse case is mostly for debugging. */
    854854    ASMAtomicWriteBool(&pCpu->fInUse, true);
     855    ASMSetFlags(fFlags);
    855856
    856857    /* Init a VT-x or AMD-V VM. */
     
    858859
    859860    ASMAtomicWriteBool(&pCpu->fInUse, false);
    860     ASMSetFlags(fFlags);
    861 
    862861    return rc;
    863862}
     
    883882    AssertReturn(!ASMAtomicReadBool(&HWACCMR0Globals.fSuspended), VERR_HWACCM_SUSPEND_PENDING);
    884883
     884    /* @note Not correct as we can be rescheduled to a different cpu, but the fInUse case is mostly for debugging. */
    885885    RTCCUINTREG     fFlags = ASMIntDisableFlags();
    886     RTCPUID         idCpu = RTMpCpuId();
    887     PHWACCM_CPUINFO pCpu = &HWACCMR0Globals.aCpuInfo[idCpu];
     886    PHWACCM_CPUINFO pCpu = HWACCMR0GetCurrentCpu();
    888887
    889888    ASMAtomicWriteBool(&pCpu->fInUse, true);
     889    ASMSetFlags(fFlags);
    890890
    891891    /* Terminate a VT-x or AMD-V VM. */
     
    893893
    894894    ASMAtomicWriteBool(&pCpu->fInUse, false);
    895     ASMSetFlags(fFlags);
    896895    return rc;
    897896}
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