From: Patrick Bridges Date: Sun, 15 Sep 2013 22:42:22 +0000 (-0500) Subject: Basic host scheduler bug fix X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc147585559de5e37d51904da4bea40347e34937;p=palacios.releases.git Basic host scheduler bug fix --- diff --git a/palacios/src/palacios/vmm_scheduler.c b/palacios/src/palacios/vmm_scheduler.c index 25a84fc..cac3425 100644 --- a/palacios/src/palacios/vmm_scheduler.c +++ b/palacios/src/palacios/vmm_scheduler.c @@ -197,9 +197,7 @@ void host_sched_schedule(struct guest_info *core) V3_Yield(); - uint64_t yield_start_cycle = (uint64_t) core->sched_priv_data; - yield_start_cycle += (uint64_t)core->vm_info->sched_priv_data; - core->sched_priv_data = (void *)yield_start_cycle; + core->sched_priv_data = (void*)v3_get_host_time(&(core->time_state)); } } @@ -213,16 +211,14 @@ void host_sched_schedule(struct guest_info *core) * usec >=0 => the timed yield is used, which also usually implies interruptible */ void host_sched_yield(struct guest_info * core, int usec) { - uint64_t yield_start_cycle; + if (usec < 0) { V3_Yield(); } else { V3_Sleep(usec); } - 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; + if (core){ + core->sched_priv_data = (void*)v3_get_host_time(&(core->time_state)); } }