Lines Matching defs:pCpu

2177     PGVMMHOSTCPU pCpu = (PGVMMHOSTCPU)pvUser;
2183 if (pCpu->u32Magic != GVMMHOSTCPU_MAGIC)
2189 RTSpinlockAcquire(pCpu->Ppt.hSpinlock);
2191 if (++pCpu->Ppt.iTickHistorization >= pCpu->Ppt.cTicksHistoriziationInterval)
2196 uint32_t iHzHistory = ++pCpu->Ppt.iHzHistory % RT_ELEMENTS(pCpu->Ppt.aHzHistory);
2197 pCpu->Ppt.aHzHistory[iHzHistory] = pCpu->Ppt.uDesiredHz;
2198 pCpu->Ppt.iTickHistorization = 0;
2199 pCpu->Ppt.uDesiredHz = 0;
2205 for (uint32_t i = 0; i < RT_ELEMENTS(pCpu->Ppt.aHzHistory); i++)
2206 if (pCpu->Ppt.aHzHistory[i] > uHistMaxHz)
2207 uHistMaxHz = pCpu->Ppt.aHzHistory[i];
2208 if (uHistMaxHz == pCpu->Ppt.uTimerHz)
2209 RTSpinlockRelease(pCpu->Ppt.hSpinlock);
2215 pCpu->Ppt.cChanges++;
2216 pCpu->Ppt.iTickHistorization = 0;
2217 pCpu->Ppt.uTimerHz = uHistMaxHz;
2219 pCpu->Ppt.cNsInterval = cNsInterval;
2221 pCpu->Ppt.cTicksHistoriziationInterval = ( GVMMHOSTCPU_PPT_HIST_INTERVAL_NS
2225 pCpu->Ppt.cTicksHistoriziationInterval = 1;
2226 RTSpinlockRelease(pCpu->Ppt.hSpinlock);
2228 /*SUPR0Printf("Cpu%u: change to %u Hz / %u ns\n", pCpu->idxCpuSet, uHistMaxHz, cNsInterval);*/
2236 pCpu->Ppt.fStarted = false;
2237 pCpu->Ppt.uTimerHz = 0;
2238 pCpu->Ppt.cNsInterval = 0;
2239 RTSpinlockRelease(pCpu->Ppt.hSpinlock);
2241 /*SUPR0Printf("Cpu%u: stopping (%u Hz)\n", pCpu->idxCpuSet, uHistMaxHz);*/
2246 RTSpinlockRelease(pCpu->Ppt.hSpinlock);
2277 PGVMMHOSTCPU pCpu = &pGVMM->aHostCpus[iCpu];
2278 AssertMsgReturnVoid( pCpu->u32Magic == GVMMHOSTCPU_MAGIC
2279 && pCpu->idCpu == idHostCpu,
2280 ("u32Magic=%#x idCpu=% idHostCpu=%d\n", pCpu->u32Magic, pCpu->idCpu, idHostCpu));
2289 if (RT_UNLIKELY( uHz > ASMAtomicReadU32(&pCpu->Ppt.uDesiredHz)
2290 && uHz >= pCpu->Ppt.uMinHz
2291 && !pCpu->Ppt.fStarting /* solaris paranoia */))
2293 RTSpinlockAcquire(pCpu->Ppt.hSpinlock);
2295 pCpu->Ppt.uDesiredHz = uHz;
2297 if (!pCpu->Ppt.fStarted)
2299 pCpu->Ppt.cStarts++;
2300 pCpu->Ppt.fStarted = true;
2301 pCpu->Ppt.fStarting = true;
2302 pCpu->Ppt.iTickHistorization = 0;
2303 pCpu->Ppt.uTimerHz = uHz;
2304 pCpu->Ppt.cNsInterval = cNsInterval = RT_NS_1SEC / uHz;
2306 pCpu->Ppt.cTicksHistoriziationInterval = ( GVMMHOSTCPU_PPT_HIST_INTERVAL_NS
2310 pCpu->Ppt.cTicksHistoriziationInterval = 1;
2313 RTSpinlockRelease(pCpu->Ppt.hSpinlock);
2317 RTTimerChangeInterval(pCpu->Ppt.pTimer, cNsInterval);
2318 int rc = RTTimerStart(pCpu->Ppt.pTimer, cNsInterval);
2321 RTSpinlockAcquire(pCpu->Ppt.hSpinlock);
2323 pCpu->Ppt.fStarted = false;
2324 pCpu->Ppt.fStarting = false;
2325 RTSpinlockRelease(pCpu->Ppt.hSpinlock);