From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7jKs-0003MW-SO for qemu-devel@nongnu.org; Wed, 24 Jun 2015 07:59:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7jKn-0000fo-6X for qemu-devel@nongnu.org; Wed, 24 Jun 2015 07:59:22 -0400 Received: from mail.ispras.ru ([83.149.199.45]:35361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7jKn-0000ez-03 for qemu-devel@nongnu.org; Wed, 24 Jun 2015 07:59:17 -0400 From: "Pavel Dovgaluk" References: <3cd46ecda4802e140ac52b2418bbaf915c2fbe67.1433052532.git.crosthwaite.peter@gmail.com> <558A7444.9010806@redhat.com> <000001d0ae72$92ab0290$b80107b0$@Dovgaluk@ispras.ru> <558A9783.2090803@redhat.com> In-Reply-To: <558A9783.2090803@redhat.com> Date: Wed, 24 Jun 2015 14:59:17 +0300 Message-ID: <000101d0ae75$32f2bd40$98d837c0$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Language: ru 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: 'Paolo Bonzini' , 'Peter Crosthwaite' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, rth@twiddle.net, edgar.iglesias@gmail.com, afaerber@suse.de, 'Peter Crosthwaite' > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > 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? I see. You are right, as far I can understand the control flow. Pavel Dovgalyuk