hv: use kick-mode in per-cpu to control kick pCPU

INIT signal has been used to kick off the partitioned pCPU, like RTVM,
whose LAPIC is pass-through. notification IPI is used to kick off
sharing pCPU.

Add mode_to_kick_pcpu in per-cpu to control the way of kicking
pCPU.

Tracked-On: #8207
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Minggui Cao
2022-08-18 15:50:10 +08:00
committed by acrnsi-robot
parent 39cdf6f7a6
commit 2c140addaf
11 changed files with 32 additions and 49 deletions

View File

@@ -23,11 +23,6 @@ enum thread_object_state {
THREAD_STS_BLOCKED
};
enum sched_notify_mode {
SCHED_NOTIFY_INIT,
SCHED_NOTIFY_IPI
};
/* Tools can configure a VM to use PRIO_LOW or PRIO_HIGH */
enum thread_priority {
PRIO_IDLE = 0,
@@ -46,7 +41,6 @@ struct thread_object {
thread_entry_t thread_entry;
volatile enum thread_object_state status;
bool be_blocking;
enum sched_notify_mode notify_mode;
uint64_t host_sp;
switch_t switch_out;
@@ -126,7 +120,7 @@ void release_schedule_lock(uint16_t pcpu_id, uint64_t rflag);
void init_thread_data(struct thread_object *obj);
void deinit_thread_data(struct thread_object *obj);
void make_reschedule_request(uint16_t pcpu_id, uint16_t delmode);
void make_reschedule_request(uint16_t pcpu_id);
bool need_reschedule(uint16_t pcpu_id);
void run_thread(struct thread_object *obj);