From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyOlN-0007l5-PE for qemu-devel@nongnu.org; Tue, 09 Dec 2014 12:40:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XyOlH-0004Fy-EX for qemu-devel@nongnu.org; Tue, 09 Dec 2014 12:39:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XyOlH-0004FZ-53 for qemu-devel@nongnu.org; Tue, 09 Dec 2014 12:39:47 -0500 Message-ID: <548733CC.8020600@redhat.com> Date: Tue, 09 Dec 2014 18:39:24 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20141208075255.7108.19079.stgit@PASHA-ISP> <20141208075345.7108.48047.stgit@PASHA-ISP> In-Reply-To: <20141208075345.7108.48047.stgit@PASHA-ISP> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v6 08/32] icount: implement icount requesting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, alex.bennee@linaro.org, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, afaerber@suse.de, fred.konrad@greensocs.com On 08/12/2014 08:53, Pavel Dovgalyuk wrote: > if (!cpu_can_do_io(cpu)) { > - fprintf(stderr, "Bad clock read\n"); > + fprintf(stderr, "Bad icount read\n"); > + exit(1); > } > icount -= (cpu->icount_decr.u16.low + cpu->icount_extra); > } > + return icount; > +} > + > +/* Return the virtual CPU time, based on the instruction counter. */ > +static int64_t cpu_get_icount_locked(void) > +{ > + int64_t icount = cpu_get_icount_raw(); > return timers_state.qemu_icount_bias + cpu_icount_to_ns(icount); So it didn't work to set can_do_io? Paolo