VirtualBox

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

Cpu poke never worked in the VT-x/AMD-V case, because pVCpu->idHostCpu was never set.

File:
1 edited

Legend:

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

    r20132 r20979  
    851851        PVMCPU pVCpu = &pVM->aCpus[i];
    852852
    853         pVCpu->hwaccm.s.idEnteredCpu              = NIL_RTCPUID;
    854 
    855853        /* Invalidate the last cpu we were running on. */
    856854        pVCpu->hwaccm.s.idLastCpu                 = NIL_RTCPUID;
     
    963961    /* Make sure we can't enter a session after we've disabled hwaccm in preparation of a suspend. */
    964962    AssertReturn(!ASMAtomicReadBool(&HWACCMR0Globals.fSuspended), VERR_HWACCM_SUSPEND_PENDING);
     963    Assert(pVCpu->idHostCpu == NIL_RTCPUID);
     964
    965965    ASMAtomicWriteBool(&pCpu->fInUse, true);
    966 
    967     AssertMsg(pVCpu->hwaccm.s.idEnteredCpu == NIL_RTCPUID, ("%d", (int)pVCpu->hwaccm.s.idEnteredCpu));
    968     pVCpu->hwaccm.s.idEnteredCpu = idCpu;
     966    ASMAtomicWriteU32(&pVCpu->idHostCpu, idCpu);
    969967
    970968    pCtx = CPUMQueryGuestCtxPtr(pVCpu);
     
    1000998#endif
    1001999    }
    1002     else
    1003         pVCpu->hwaccm.s.idEnteredCpu = NIL_RTCPUID;
    10041000    return rc;
    10051001}
     
    10421038    /* keep track of the CPU owning the VMCS for debugging scheduling weirdness and ring-3 calls. */
    10431039#ifdef RT_STRICT
    1044     if (RT_UNLIKELY(    pVCpu->hwaccm.s.idEnteredCpu != idCpu
     1040    if (RT_UNLIKELY(    pVCpu->idHostCpu != idCpu
    10451041                    &&  RT_FAILURE(rc)))
    10461042    {
    1047         AssertMsgFailed(("Owner is %d, I'm %d", (int)pVCpu->hwaccm.s.idEnteredCpu, (int)idCpu));
     1043        AssertMsgFailed(("Owner is %d, I'm %d", (int)pVCpu->idHostCpu, (int)idCpu));
    10481044        rc = VERR_INTERNAL_ERROR;
    10491045    }
    10501046#endif
    1051     pVCpu->hwaccm.s.idEnteredCpu = NIL_RTCPUID;
    10521047
    10531048    ASMAtomicWriteBool(&pCpu->fInUse, false);
     
    12001195        PVMCPU pVCpu = &pVM->aCpus[idCpu];
    12011196
    1202         if (pVCpu->hwaccm.s.idEnteredCpu == idHostCpu)
     1197        if (pVCpu->idHostCpu == idHostCpu)
    12031198            return pVCpu;
    12041199    }
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