From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qvldg-0001pb-08 for qemu-devel@nongnu.org; Tue, 23 Aug 2011 03:43:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qvlde-0002er-V8 for qemu-devel@nongnu.org; Tue, 23 Aug 2011 03:43:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qvlde-0002el-Nm for qemu-devel@nongnu.org; Tue, 23 Aug 2011 03:43:10 -0400 Message-ID: <4E535A08.8050706@redhat.com> Date: Tue, 23 Aug 2011 09:43:04 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1314040874-9259-1-git-send-email-aliguori@us.ibm.com> <1314040874-9259-2-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1314040874-9259-2-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] [RFC] time: refactor QEMU timer to use GHRTimer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Jan Kiszka On 08/22/2011 09:21 PM, Anthony Liguori wrote: > - ticks = cpu_get_real_ticks(); > - if (timers_state.cpu_ticks_prev > ticks) { > - /* Note: non increasing ticks may happen if the host uses > - software suspend */ > - timers_state.cpu_ticks_offset += timers_state.cpu_ticks_prev - ticks; > - } > + ticks = get_clock(); > > [...] > > -static inline int64_t cpu_get_real_ticks(void) > -{ > - int64_t val; > - asm volatile ("rdtsc" : "=A" (val)); > - return val; > -} > - cpu_get_ticks is used also to emulate the guest TSC, are you sure you want to change that uniformly to a 1 GHz rate? I had some more cleanups in this area, I'll try to get them tested and submitted but I have little time for this right now. Paolo