From: Lei Xia Date: Thu, 14 Apr 2011 17:20:34 +0000 (-0500) Subject: Fix to the time period calculation X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=5070a2b7685d1fe39072e3d503d07ffb29b3d5b5;hp=3aa43c8aeb9750675238aa33db37c771d815a706;p=palacios-OLD.git Fix to the time period calculation --- diff --git a/palacios/src/devices/nvram.c b/palacios/src/devices/nvram.c index f2c45a3..b8481a7 100644 --- a/palacios/src/devices/nvram.c +++ b/palacios/src/devices/nvram.c @@ -472,7 +472,8 @@ static void nvram_update_timer(struct guest_info *vm, uint64_t period_us; - period_us = (1000000*cpu_cycles/cpu_freq); + // cpu_freq is in kHz + period_us = (1000000*cpu_cycles/(cpu_freq*1000)); update_time(nvram_state,period_us);