qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/3] exec.c: Don't call cpu_reload_memory_map()


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [PATCH 1/3] exec.c: Don't call cpu_reload_memory_map() from cpu_exec_init()
Date: Sat, 4 Jul 2015 08:40:35 +1000
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>

Cheers,
Edgar


 
> Signed-off-by: Peter Maydell <address@hidden>
> ---
>  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
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]