From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZE3BG-0005NE-Hl for qemu-devel@nongnu.org; Sat, 11 Jul 2015 18:23:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZE3BB-0006sr-Hl for qemu-devel@nongnu.org; Sat, 11 Jul 2015 18:23:34 -0400 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:33695) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZE3BB-0006sj-AD for qemu-devel@nongnu.org; Sat, 11 Jul 2015 18:23:29 -0400 Received: by wgmn9 with SMTP id n9so18758514wgm.0 for ; Sat, 11 Jul 2015 15:23:28 -0700 (PDT) Sender: Paolo Bonzini References: From: Paolo Bonzini Message-ID: <55A1975B.5000500@redhat.com> Date: Sun, 12 Jul 2015 00:23:23 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] Semantics of tcg_enabled() and what it means for multi-arch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , Richard Henderson , "qemu-devel@nongnu.org Developers" On 11/07/2015 22:46, Peter Crosthwaite wrote: > include/exec/ram_addr.h: if (tcg_enabled()) { > include/exec/ram_addr.h: uint8_t clients = tcg_enabled() ? > DIRTY_CLIENTS_ALL : DIRTY_CLIENTS_NOCODE; > memory.c: mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : 0; > memory.c: mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : 0; > memory.c: mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : 0; > memory.c: mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : 0; > > So what is the correct logic for populating dirty_log_mask and friends > when there are 0. 1, or more TCG engines? I think it should be set if there's at least one TCG engine. Have you checked BTW it the DIRTY_MEMORY_CODE stuff works with multiple tcg_ctxs _and_ the same page hosts code for more than one CPU type? Offhand I have no idea of the answer... Paolo