From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7j48-0005oQ-5h for qemu-devel@nongnu.org; Wed, 24 Jun 2015 07:42:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7j44-0000yf-Uk for qemu-devel@nongnu.org; Wed, 24 Jun 2015 07:42:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7j44-0000yb-P0 for qemu-devel@nongnu.org; Wed, 24 Jun 2015 07:42:00 -0400 Message-ID: <558A9783.2090803@redhat.com> Date: Wed, 24 Jun 2015 13:41:55 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <3cd46ecda4802e140ac52b2418bbaf915c2fbe67.1433052532.git.crosthwaite.peter@gmail.com> <558A7444.9010806@redhat.com> <000001d0ae72$92ab0290$b80107b0$@Dovgaluk@ispras.ru> In-Reply-To: <000001d0ae72$92ab0290$b80107b0$@Dovgaluk@ispras.ru> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 07/34] exec-all: Move cpu_can_do_io to qom/cpu.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgaluk , 'Peter Crosthwaite' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, rth@twiddle.net, edgar.iglesias@gmail.com, afaerber@suse.de, 'Peter Crosthwaite' On 24/06/2015 13:40, Pavel Dovgaluk wrote: >>> > > + /* If not executing code then assume we are ok. */ >>> > > + if (cpu->current_tb == NULL) { >>> > > + return true; >>> > > + } >>> > > + return cpu->can_do_io != 0; >> > >> > For what it's worth, I think the "if" here is dead. Pavel? > cpu_can_do_io can be called from cpus.c and translate-all.c > In both cases these calls could be made outside the generated code. Yes, but doesn't your commit 626cf8f (icount: set can_do_io outside TB execution, 2014-12-08) cause cpu->can_do_io == 0 to imply cpu->current_tb != NULL? Paolo