cpu: Reorder cpu->as, cpu->thread_id, cpu->memory_dispatch init
commit291135b5da228e58900c120e12354cc0a23608e3
authorEduardo Habkost <ehabkost@redhat.com>
Mon, 27 Apr 2015 20:00:33 +0000 (27 17:00 -0300)
committerAndreas Färber <afaerber@suse.de>
Thu, 9 Jul 2015 13:20:39 +0000 (9 15:20 +0200)
tree6eed41ee609dc3dbd3a1509f0a5eccaed39229cf
parent7c39163e389e6e6e16965606fb5a26abcdb6ad73
cpu: Reorder cpu->as, cpu->thread_id, cpu->memory_dispatch init

Instead of initializing cpu->as, cpu->thread_id, and reloading memory
map while holding cpu_list_lock(), do it earlier, before locking the CPU
list and initializing cpu_index.

This allows the code handling cpu_index and global CPU list to be
isolated from the rest.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
exec.c