-public:
- /** @brief Get the available speed of the current Cpu */
- virtual double getAvailableSpeed();
-
- /** @brief Get the current Cpu computational speed */
- virtual double getPstateSpeedCurrent();
- virtual double getPstateSpeed(int pstate_index);
-
- virtual int getNbPStates();
- virtual void setPState(int pstate_index);
- virtual int getPState();
-
- simgrid::s4u::Host* getHost() { return host_; }
-
-public:
- int coresAmount_ = 1;
- simgrid::s4u::Host* host_;
-
- xbt_dynar_t speedPerPstate_ = NULL; /*< List of supported CPU capacities (pstate related) */
- int pstate_ = 0; /*< Current pstate (index in the speedPeakList)*/
-
- /* Note (hypervisor): */
- lmm_constraint_t *p_constraintCore=NULL;
- void **p_constraintCoreId=NULL;
-
-public:
- virtual void setStateTrace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF). Trace must contain boolean values (0 or 1). */
- virtual void setSpeedTrace(tmgr_trace_t trace); /*< setup the trace file with availability events (peak speed changes due to external load). Trace must contain relative values (ratio between 0 and 1) */
+ /** Reset most characteristics of this CPU to the one of that CPU.
+ *
+ * Used to reset a VCPU when its VM migrates to another host, so it only resets the fields that should be in this
+ *case.
+ **/
+ virtual void reset_vcpu(Cpu* that);