From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsCLL-0005tf-W2 for qemu-devel@nongnu.org; Tue, 12 May 2015 11:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsCLJ-0008Ed-8d for qemu-devel@nongnu.org; Tue, 12 May 2015 11:43:39 -0400 Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]:36153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsCLJ-0008EZ-3q for qemu-devel@nongnu.org; Tue, 12 May 2015 11:43:37 -0400 Received: by qku63 with SMTP id 63so8331733qku.3 for ; Tue, 12 May 2015 08:43:36 -0700 (PDT) Sender: Richard Henderson Message-ID: <55521FA4.4080409@twiddle.net> Date: Tue, 12 May 2015 08:43:32 -0700 From: Richard Henderson MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] when does a target frontend need to use gen_io_start()/gen_io_end() ? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , QEMU Developers Cc: Paolo Bonzini , Pavel Dovgaluk On 05/12/2015 08:32 AM, Peter Maydell wrote: > In order for -icount to work, it's important for the target > translate.c code to correctly bracket any generated code which > can "do I/O" with gen_io_start()/gen_io_end() calls. But > does anybody know exactly what the criteria are here for this? > It would be nice if we could document this in a comment in > gen_icount.h -- I'm happy to write one up if somebody will just > tell me what the right answer is :-) I'm really not sure. So far I've assumed "i/o"-like insns, and those that can read some sort of cycle counter. So while that handles easy cases like "inb" and "rdcc", it certainly doesn't handle any target for which all i/o is memory mapped. Which is sorta most of them these days, so the utility seems to be low... r~