/* Currently, a VM uses the network resource of its physical host */
pimpl_netpoint = pm->pimpl_netpoint;
+
// Create a VCPU for this VM
- surf::CpuCas01* sub_cpu = dynamic_cast<surf::CpuCas01*>(pm->pimpl_cpu);
+ std::vector<double> speeds;
+ for (int i = 0; i < pm->get_pstate_count(); i++)
+ speeds.push_back(pm->getPstateSpeed(i));
- pimpl_cpu = surf_cpu_model_vm->createCpu(this, sub_cpu->getSpeedPeakList(), coreAmount);
- if (sub_cpu->getPState() != 0)
- pimpl_cpu->setPState(sub_cpu->getPState());
+ surf_cpu_model_vm->create_cpu(this, &speeds, pm->get_core_count());
+ if (pm->get_pstate() != 0)
+ set_pstate(pm->get_pstate());
/* Make a process container */
extension_set<simgrid::simix::Host>(new simgrid::simix::Host());