From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9t7X-0007Gl-4G for qemu-devel@nongnu.org; Wed, 23 Jul 2014 05:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9t7Q-0001cY-Tx for qemu-devel@nongnu.org; Wed, 23 Jul 2014 05:45:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9t7Q-0001cT-K9 for qemu-devel@nongnu.org; Wed, 23 Jul 2014 05:45:52 -0400 Message-ID: <53CF8441.6040008@redhat.com> Date: Wed, 23 Jul 2014 11:45:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1406106691-21912-1-git-send-email-sebastian.tanase@openwide.fr> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] icount: Fix virtual clock start value on ARM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Sebastian Tanase Cc: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Stefan Hajnoczi , QEMU Developers , Alex Bligh , "Michael S. Tsirkin" Il 23/07/2014 11:41, Peter Maydell ha scritto: > On 23 July 2014 10:11, Sebastian Tanase wrote: >> When using the icount option on ARM, the virtual >> clock starts counting at realtime clock but it >> should start at 0. >> This small fix addresses this issue. >> >> Signed-off-by: Sebastian Tanase >> --- >> cpus.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/cpus.c b/cpus.c >> index 5e7f2cf..de18ece 100644 >> --- a/cpus.c >> +++ b/cpus.c >> @@ -104,7 +104,7 @@ static bool all_cpu_threads_idle(void) >> >> /* Compensate for varying guest execution speed. */ >> static int64_t qemu_icount_bias; >> -static int64_t vm_clock_warp_start; >> +static int64_t vm_clock_warp_start = -1; >> /* Conversion factor from emulated instructions to virtual clock ticks. */ >> static int icount_time_shift; >> /* Arbitrarily pick 1MIPS as the minimum allowable speed. */ > > Commit message says this is fixing an ARM bug but this is > a generic file. Is this actually a bug with wider scope than just > ARM? Yes, see the discussion yesterday under "Re: [RFC PATCH V4 6/6] monitor: Add drift info to 'info jit'" and "Re: [RFC PATCH V4 0/6] icount: Implement delay algorithm between guest and host clocks". Paolo