hv: move pcpu offline request and vm shutdown request from schedule

From modulization perspective, it's not suitable to put pcpu and vm
related request operations in schedule. So move them to pcpu and vm
module respectively. Also change need_offline return value to bool.

Tracked-On: #3663
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
This commit is contained in:
Shuo A Liu
2019-05-21 11:52:21 +08:00
committed by wenlingz
parent 9389225633
commit 2cc45534d6
7 changed files with 36 additions and 40 deletions

View File

@@ -264,6 +264,11 @@ enum pcpu_boot_state {
PCPU_STATE_DEAD,
};
#define NEED_OFFLINE (1U)
#define NEED_SHUTDOWN_VM (2U)
void make_pcpu_offline(uint16_t pcpu_id);
bool need_offline(uint16_t pcpu_id);
/* Function prototypes */
void cpu_do_idle(void);
void cpu_dead(void);