diff options
author | Peter Xu <peterx@redhat.com> | 2017-11-23 17:23:33 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-12-21 09:30:31 +0100 |
commit | 87a621d857be1b2b3dd1d0847ca311a863dbcb53 (patch) | |
tree | 39b76eac4c8562a533562dc047c8234c87c3b43c | |
parent | 80ceb07a83375e3a0091591f96bd47bce2f640ce (diff) |
cpu: suffix cpu address spaces with cpu index
Renaming cpu address space names so that they won't be the same when
there are more than one.
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20171123092333.16085-4-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -710,9 +710,12 @@ void cpu_address_space_init(CPUState *cpu, int asidx, { CPUAddressSpace *newas; AddressSpace *as = g_new0(AddressSpace, 1); + char *as_name; assert(mr); - address_space_init(as, mr, prefix); + as_name = g_strdup_printf("%s-%d", prefix, cpu->cpu_index); + address_space_init(as, mr, as_name); + g_free(as_name); /* Target code should have set num_ases before calling us */ assert(asidx < cpu->num_ases); |