diff --git a/hypervisor/common/schedule.c b/hypervisor/common/schedule.c index fcca1e071..305804c08 100644 --- a/hypervisor/common/schedule.c +++ b/hypervisor/common/schedule.c @@ -54,6 +54,7 @@ void init_sched(uint16_t pcpu_id) spinlock_init(&ctl->scheduler_lock); ctl->flags = 0UL; ctl->curr_obj = NULL; + ctl->pcpu_id = pcpu_id; } void get_schedule_lock(uint16_t pcpu_id) diff --git a/hypervisor/include/common/schedule.h b/hypervisor/include/common/schedule.h index 964d670e1..a9005adcb 100644 --- a/hypervisor/include/common/schedule.h +++ b/hypervisor/include/common/schedule.h @@ -41,6 +41,7 @@ struct thread_object { }; struct sched_control { + uint16_t pcpu_id; uint64_t flags; struct thread_object *curr_obj; spinlock_t scheduler_lock; /* to protect sched_control and thread_object */