From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwYge-0005Xq-Mx for qemu-devel@nongnu.org; Thu, 04 Dec 2014 10:51:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwYgY-0006dN-JS for qemu-devel@nongnu.org; Thu, 04 Dec 2014 10:51:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwYgY-0006cz-Bg for qemu-devel@nongnu.org; Thu, 04 Dec 2014 10:51:18 -0500 Message-ID: <548082E2.2060602@redhat.com> Date: Thu, 04 Dec 2014 16:50:58 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20141126103841.7772.11864.stgit@PASHA-ISP> <20141126103925.7772.13043.stgit@PASHA-ISP> <547EE34D.4000500@redhat.com> <000c01d00fb1$c2010860$46031920$@Dovgaluk@ispras.ru> In-Reply-To: <000c01d00fb1$c2010860$46031920$@Dovgaluk@ispras.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v5 07/31] icount: implement icount requesting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgaluk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, alex.bennee@linaro.org, afaerber@suse.de, fred.konrad@greensocs.com On 04/12/2014 12:02, Pavel Dovgaluk wrote: >> > Why do you need to do this if !cpu_can_do_io(cpu)? > We save number of executed instruction when saving interrupt or exception event. > It leads to the call of cpu_get_instructions_counter() from cpu_exec function > (through several replay functions). It is correct (because no block is executing > at that moment) but is different to prior usage of icount requests. Why is !cpu_can_do_io(cpu) if no block is executing? I'm not saying the function is wrong, just that it warrants a more thorough review. Paolo