Received: from eggs.gnu.org ([2001:4830:134:3::10]:48785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKaC2-00041g-9z for qemu-devel@nongnu.org; Tue, 05 Jul 2016 19:55:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKaBw-0007LD-CX for qemu-devel@nongnu.org; Tue, 05 Jul 2016 19:55:53 -0400 Received: from mail-qt0-x230.google.com ([2607:f8b0:400d:c0d::230]:34735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKaBw-0007L8-7H for qemu-devel@nongnu.org; Tue, 05 Jul 2016 19:55:48 -0400 Received: by mail-qt0-x230.google.com with SMTP id m2so109322319qtd.1 for ; Tue, 05 Jul 2016 16:55:47 -0700 (PDT) Sender: Richard Henderson References: <1467384450-7267-1-git-send-email-mrolnik@gmail.com> From: Richard Henderson Message-ID: <4628c568-2146-68fc-0e11-2efdd45abf5e@twiddle.net> Date: Tue, 5 Jul 2016 16:55:44 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v9 00/10] 8bit AVR cores List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Rolnik , Peter Maydell Cc: QEMU Developers On 07/05/2016 02:41 PM, Michael Rolnik wrote: > right it accesses CPU registers but from helper context. > the flow is as follows > > 1. there is a write to [0x0000: 0x0100) region > 2. tlb_fill is called, it does the following > a. sets env->fullwr > b. calls cpu_loop_exit_restore. > c. the whole block is retranslated and instead of st it generates > helper_fullwr for each store within this TB. > 3. helper_fullwr calls cpu_physical_memory_write > 4. sample_io_write is called and register is changed since the whole thing is > done from within a helper It is my opinion that helper_fullwr should simply modify the respective registers. There's no point adding two more layers of calls. You also need to reset env->fullwr at some point. r~