VirtualBox

Ignore:
Timestamp:
Jun 26, 2009 3:03:24 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49189
Message:

Backed out 49187; toxic

File:
1 edited

Legend:

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

    r20979 r20981  
    851851        PVMCPU pVCpu = &pVM->aCpus[i];
    852852
     853        pVCpu->hwaccm.s.idEnteredCpu              = NIL_RTCPUID;
     854
    853855        /* Invalidate the last cpu we were running on. */
    854856        pVCpu->hwaccm.s.idLastCpu                 = NIL_RTCPUID;
     
    961963    /* Make sure we can't enter a session after we've disabled hwaccm in preparation of a suspend. */
    962964    AssertReturn(!ASMAtomicReadBool(&HWACCMR0Globals.fSuspended), VERR_HWACCM_SUSPEND_PENDING);
    963     Assert(pVCpu->idHostCpu == NIL_RTCPUID);
    964 
    965965    ASMAtomicWriteBool(&pCpu->fInUse, true);
    966     ASMAtomicWriteU32(&pVCpu->idHostCpu, idCpu);
     966
     967    AssertMsg(pVCpu->hwaccm.s.idEnteredCpu == NIL_RTCPUID, ("%d", (int)pVCpu->hwaccm.s.idEnteredCpu));
     968    pVCpu->hwaccm.s.idEnteredCpu = idCpu;
    967969
    968970    pCtx = CPUMQueryGuestCtxPtr(pVCpu);
     
    9981000#endif
    9991001    }
     1002    else
     1003        pVCpu->hwaccm.s.idEnteredCpu = NIL_RTCPUID;
    10001004    return rc;
    10011005}
     
    10381042    /* keep track of the CPU owning the VMCS for debugging scheduling weirdness and ring-3 calls. */
    10391043#ifdef RT_STRICT
    1040     if (RT_UNLIKELY(    pVCpu->idHostCpu != idCpu
     1044    if (RT_UNLIKELY(    pVCpu->hwaccm.s.idEnteredCpu != idCpu
    10411045                    &&  RT_FAILURE(rc)))
    10421046    {
    1043         AssertMsgFailed(("Owner is %d, I'm %d", (int)pVCpu->idHostCpu, (int)idCpu));
     1047        AssertMsgFailed(("Owner is %d, I'm %d", (int)pVCpu->hwaccm.s.idEnteredCpu, (int)idCpu));
    10441048        rc = VERR_INTERNAL_ERROR;
    10451049    }
    10461050#endif
     1051    pVCpu->hwaccm.s.idEnteredCpu = NIL_RTCPUID;
    10471052
    10481053    ASMAtomicWriteBool(&pCpu->fInUse, false);
     
    11951200        PVMCPU pVCpu = &pVM->aCpus[idCpu];
    11961201
    1197         if (pVCpu->idHostCpu == idHostCpu)
     1202        if (pVCpu->hwaccm.s.idEnteredCpu == idHostCpu)
    11981203            return pVCpu;
    11991204    }
Note: See TracChangeset for help on using the changeset viewer.

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