mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv: add priority based scheduler
This patch adds a new priority based scheduler to support vCPU scheduling based on their pre-configured priorities. A vCPU can be running only if there is no higher priority vCPU running on the same pCPU. Tracked-On: #6571 Signed-off-by: Jie Deng <jie.deng@intel.com>
This commit is contained in:
@@ -963,6 +963,7 @@ int32_t prepare_vcpu(struct acrn_vm *vm, uint16_t pcpu_id)
|
||||
vcpu->thread_obj.host_sp = build_stack_frame(vcpu);
|
||||
vcpu->thread_obj.switch_out = context_switch_out;
|
||||
vcpu->thread_obj.switch_in = context_switch_in;
|
||||
vcpu->thread_obj.priority = get_vm_config(vm->vm_id)->vm_prio;
|
||||
init_thread_data(&vcpu->thread_obj);
|
||||
for (i = 0; i < VCPU_EVENT_NUM; i++) {
|
||||
init_event(&vcpu->events[i]);
|
||||
|
Reference in New Issue
Block a user