Received: from eggs.gnu.org ([2001:4830:134:3::10]:55414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eZNpu-0001Kp-Jn for qemu-devel@nongnu.org; Wed, 10 Jan 2018 16:23:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eZNpp-0007J7-SN for qemu-devel@nongnu.org; Wed, 10 Jan 2018 16:23:02 -0500 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:33692) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eZNpp-0007Hg-Fn for qemu-devel@nongnu.org; Wed, 10 Jan 2018 16:22:57 -0500 Received: by mail-pg0-x242.google.com with SMTP id i196so583307pgd.0 for ; Wed, 10 Jan 2018 13:22:57 -0800 (PST) References: <20180108231048.23966-1-laurent@vivier.eu> <20180108231048.23966-5-laurent@vivier.eu> From: Richard Henderson Message-ID: Date: Wed, 10 Jan 2018 13:22:52 -0800 MIME-Version: 1.0 In-Reply-To: <20180108231048.23966-5-laurent@vivier.eu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/6] target/m68k: add moves List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-devel@nongnu.org On 01/08/2018 03:10 PM, Laurent Vivier wrote: > and introduce SFC and DFC control registers. > > Signed-off-by: Laurent Vivier The patch is correct, so Reviewed-by: Richard Henderson However... > +void HELPER(moves_store)(CPUM68KState *env, uint32_t val, > + uint32_t addr, uint32_t size) > +{ > + if (env->dfc & 4) { /* kernel */ > + switch (size) { > + case OS_BYTE: > + cpu_stb_kernel_ra(env, addr, val, GETPC()); I assume that the kernel makes frequent use of moves for user access? You might consider copying bit 2 of SFC and DFC into TB->FLAGS, if supervisor mode. At which point you can issue the qemu_ld/st opcodes inline to the correct mmu_idx. r~