Received: from eggs.gnu.org ([2001:4830:134:3::10]:52124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB9dD-0005mX-D4 for qemu-devel@nongnu.org; Fri, 03 Jul 2015 18:40:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZB9dA-0003Yq-7o for qemu-devel@nongnu.org; Fri, 03 Jul 2015 18:40:27 -0400 Received: from mail-pd0-x233.google.com ([2607:f8b0:400e:c02::233]:35858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZB9dA-0003YV-07 for qemu-devel@nongnu.org; Fri, 03 Jul 2015 18:40:24 -0400 Received: by pdcu2 with SMTP id u2so70776730pdc.3 for ; Fri, 03 Jul 2015 15:40:22 -0700 (PDT) Date: Sat, 4 Jul 2015 08:40:35 +1000 From: "Edgar E. Iglesias" Message-ID: <20150703224035.GB1952@toto> References: <1435936303-15335-1-git-send-email-peter.maydell@linaro.org> <1435936303-15335-2-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435936303-15335-2-git-send-email-peter.maydell@linaro.org> Subject: Re: [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: Peter Maydell Cc: Paolo Bonzini , qemu-devel@nongnu.org, patches@linaro.org On Fri, Jul 03, 2015 at 04:11:41PM +0100, Peter Maydell wrote: > 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. > Looks good to me; Reviewed-by: Edgar E. Iglesias Cheers, Edgar > 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 >