Lines Matching defs:cCpus

103 static int                  vmR3CreateUVM(uint32_t cCpus, PCVMM2USERMETHODS pVmm2UserMethods, PUVM *ppUVM);
104 static int vmR3CreateU(PUVM pUVM, uint32_t cCpus, PFNCFGMCONSTRUCTOR pfnCFGMConstructor, void *pvUserCFGM);
105 static int vmR3ReadBaseConfig(PVM pVM, PUVM pUVM, uint32_t cCpus);
160 * @param cCpus Number of virtual CPUs for the new VM.
182 VMMR3DECL(int) VMR3Create(uint32_t cCpus, PCVMM2USERMETHODS pVmm2UserMethods,
187 LogFlow(("VMR3Create: cCpus=%RU32 pVmm2UserMethods=%p pfnVMAtError=%p pvUserVM=%p pfnCFGMConstructor=%p pvUserCFGM=%p ppVM=%p ppUVM=%p\n",
188 cCpus, pVmm2UserMethods, pfnVMAtError, pvUserVM, pfnCFGMConstructor, pvUserCFGM, ppVM, ppUVM));
226 AssertLogRelMsgReturn(cCpus > 0 && cCpus <= VMM_MAX_CPU_COUNT, ("%RU32\n", cCpus), VERR_TOO_MANY_CPUS);
233 int rc = vmR3CreateUVM(cCpus, pVmm2UserMethods, &pUVM);
256 (PFNRT)vmR3CreateU, 4, pUVM, cCpus, pfnCFGMConstructor, pvUserCFGM);
461 * @param cCpus Number of virtual CPUs
466 static int vmR3CreateUVM(uint32_t cCpus, PCVMM2USERMETHODS pVmm2UserMethods, PUVM *ppUVM)
473 PUVM pUVM = (PUVM)RTMemPageAllocZ(RT_OFFSETOF(UVM, aCpus[cCpus]));
476 pUVM->cCpus = cCpus;
490 for (i = 0; i < cCpus; i++)
502 for (i = 0; i < cCpus; i++)
504 for (i = 0; i < cCpus; i++)
533 for (i = 0; i < cCpus; i++)
537 cCpus > 1 ? "EMT-%u" : "EMT", i);
566 for (i = 0; i < cCpus; i++)
573 RTMemPageFree(pUVM, RT_OFFSETOF(UVM, aCpus[pUVM->cCpus]));
583 static int vmR3CreateU(PUVM pUVM, uint32_t cCpus, PFNCFGMCONSTRUCTOR pfnCFGMConstructor, void *pvUserCFGM)
607 CreateVMReq.cCpus = cCpus;
615 AssertRelease(pVM->cCpus == cCpus);
622 Log(("VMR3Create: Created pUVM=%p pVM=%p pVMR0=%p hSelf=%#x cCpus=%RU32\n",
623 pUVM, pVM, pVM->pVMR0, pVM->hSelf, pVM->cCpus));
630 for (VMCPUID i = 0; i < pVM->cCpus; i++)
648 rc = vmR3ReadBaseConfig(pVM, pUVM, cCpus);
739 for (VMCPUID i = 0; i < pUVM->cCpus; i++)
746 if (pUVM->cCpus > 1)
751 for (VMCPUID i = 1; i < pUVM->cCpus; i++)
753 RTThreadSleep(RT_MIN(100 + 25 *(pUVM->cCpus - 1), 500)); /* very sophisticated */
773 * @param cCpus The CPU count given to VMR3Create.
775 static int vmR3ReadBaseConfig(PVM pVM, PUVM pUVM, uint32_t cCpus)
824 AssertLogRelMsgReturn(cCPUsCfg == cCpus,
825 ("Configuration error: \"NumCPUs\"=%RU32 and VMR3Create::cCpus=%RU32 does not match!\n",
826 cCPUsCfg, cCpus),
880 for (VMCPUID idCpu = 1; idCpu < pVM->cCpus; idCpu++)
905 for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
1283 if (pVCpu->idCpu == pVM->cCpus - 1)
1375 if (pVCpu->idCpu == pVM->cCpus - 1)
1473 if (pVCpu->idCpu == pVM->cCpus - 1)
1574 if (pVCpu->idCpu == pVM->cCpus - 1U)
2264 if (pVCpu->idCpu == pVM->cCpus - 1)
2581 for (VMCPUID i = 0; i < pUVM->cCpus; i++)
2591 for (VMCPUID i = 0; i < pUVM->cCpus; i++)
2612 for (VMCPUID i = 0; i < pUVM->cCpus; i++)
2663 for (VMCPUID idCpu = 0; idCpu < pUVM->cCpus; idCpu++)
2755 if (pVCpu->idCpu == pVM->cCpus - 1)
2964 RTMemPageFree(pUVM, RT_OFFSETOF(UVM, aCpus[pUVM->cCpus]));
4075 if (pVCpu->idCpu == pVM->cCpus - 1)
4375 if (idCpu >= pVM->cCpus)
4435 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID);
4457 AssertReturn(idCpu < pVM->cCpus, VERR_INVALID_CPU_ID);