From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB2mj-0005qm-Vj for qemu-devel@nongnu.org; Fri, 03 Jul 2015 11:21:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZB2mj-0003DL-4J for qemu-devel@nongnu.org; Fri, 03 Jul 2015 11:21:49 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB2mi-0003D0-UD for qemu-devel@nongnu.org; Fri, 03 Jul 2015 11:21:49 -0400 From: Peter Maydell Date: Fri, 3 Jul 2015 16:11:41 +0100 Message-Id: <1435936303-15335-2-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1435936303-15335-1-git-send-email-peter.maydell@linaro.org> References: <1435936303-15335-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 1/3] exec.c: Don't call cpu_reload_memory_map() from cpu_exec_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , "Edgar E. Iglesias" , patches@linaro.org Currently we call cpu_reload_memory_map() from cpu_exec_init(), but this is not necessary: * KVM doesn't use the data structures maintained by cpu_reload_memory_map() (the TLB and cpu->memory_dispatch) * for TCG, we will call this function via tcg_commit() either as soon as tcg_cpu_address_space_init() registers the listener, or when the first MemoryRegion is added to the AddressSpace if the AS is empty when we register the listener The unnecessary call is awkward for adding support for multiple address spaces per CPU, so drop it. Signed-off-by: Peter Maydell --- exec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/exec.c b/exec.c index f7883d2..2616394 100644 --- a/exec.c +++ b/exec.c @@ -534,7 +534,6 @@ void cpu_exec_init(CPUArchState *env) #ifndef CONFIG_USER_ONLY cpu->as = &address_space_memory; cpu->thread_id = qemu_get_thread_id(); - cpu_reload_memory_map(cpu); #endif QTAILQ_INSERT_TAIL(&cpus, cpu, node); #if defined(CONFIG_USER_ONLY) -- 1.9.1