X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_scheduler.c;h=25a84fc192b17d0debabc028b74f657da231c8d1;hb=02d617c8f625ad5da6c4c9b78b224e84baac5d08;hp=56318905caf1de62cd7c09766c5fd7a9dc68a7f4;hpb=d0749ff925973a43b8a9d98645d52d02d8766331;p=palacios.git diff --git a/palacios/src/palacios/vmm_scheduler.c b/palacios/src/palacios/vmm_scheduler.c index 5631890..25a84fc 100644 --- a/palacios/src/palacios/vmm_scheduler.c +++ b/palacios/src/palacios/vmm_scheduler.c @@ -94,12 +94,13 @@ int V3_enable_scheduler() { scheduler = v3_scheduler_lookup(default_strategy); } - PrintDebug(VM_NONE, VCORE_NONE,"Scheduler %s found",scheduler->name); - if (!scheduler) { PrintError(VM_NONE, VCORE_NONE,"Specified Palacios scheduler \"%s\" not found.\n", default_strategy); return -1; } + + PrintDebug(VM_NONE, VCORE_NONE,"Scheduler %s found",scheduler->name); + if (scheduler->init) { return scheduler->init(); } else { @@ -218,9 +219,11 @@ void host_sched_yield(struct guest_info * core, int usec) { } else { V3_Sleep(usec); } - yield_start_cycle = (uint64_t) core->sched_priv_data - + (uint64_t)core->vm_info->sched_priv_data; - core->sched_priv_data = (void *)yield_start_cycle; + if(core){ + yield_start_cycle = (uint64_t) core->sched_priv_data + + (uint64_t)core->vm_info->sched_priv_data; + core->sched_priv_data = (void *)yield_start_cycle; + } }