mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
hv: handle cpu offline request in idle thread
Change need_scheduled fileds of schedule context to flags because it's not only used for need_schedule check. Add two functions to request/handle cpu offline. The reason we only handle cpu offline request in idle thread is that we should pause the vcpu running on target pcpu. Then it's only possible that target pcpu get cpu offline request in idle thread. Signed-off-by: Yin Fegnwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
@@ -44,7 +44,7 @@ void vcpu_thread(struct vcpu *vcpu)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (need_rescheduled(vcpu->pcpu_id)) {
|
||||
if (need_reschedule(vcpu->pcpu_id)) {
|
||||
/*
|
||||
* In extrem case, schedule() could return. Which
|
||||
* means the vcpu resume happens before schedule()
|
||||
|
||||
Reference in New Issue
Block a user