X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_scheduler.c;h=506429bb5261b58facb1d44f9ab5ed249ec001d7;hb=fc4b7290edb57a3528a26f95c4478fe07d45a581;hp=c214d63089cad9514f1d92a172315f869961d648;hpb=aeb2dd5e0468a94dd992a21d9e6e8ac5b925d2e6;p=palacios.git diff --git a/palacios/src/palacios/vmm_scheduler.c b/palacios/src/palacios/vmm_scheduler.c index c214d63..506429b 100644 --- a/palacios/src/palacios/vmm_scheduler.c +++ b/palacios/src/palacios/vmm_scheduler.c @@ -59,7 +59,9 @@ int V3_init_scheduling() { int V3_deinit_scheduling() { destroy_host_scheduler(); - v3_free_htable(master_scheduler_table,1,1); + // important not to remove any keys or values since we don't know + // if they are malloced or other + v3_free_htable(master_scheduler_table,0,0); return 0; } @@ -202,6 +204,10 @@ int host_sched_vm_init(struct v3_vm_info *vm) if (schedule_hz_str) { sched_hz = atoi(schedule_hz_str); + if (sched_hz==0) { + PrintError(vm, VCORE_NONE,"Cannot set Sched Hz to 0\n"); + return -1; + } } PrintDebug(vm, VCORE_NONE,"CPU_KHZ = %d, schedule_freq=%p\n", V3_CPU_KHZ(), @@ -331,5 +337,6 @@ static int create_host_scheduler() static int destroy_host_scheduler() { v3_unregister_scheduler(host_sched_impl.name); + // no deletion of this since it's a pointer to a global var return 0; }