qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Alexey Kardashevskiy <aik@ozlabs.ru>,
	peterx@redhat.com
Subject: [Qemu-devel] [PATCH v2 2/3] cpu: suffix cpu address spaces with cpu index
Date: Fri, 24 Nov 2017 15:34:16 +0800	[thread overview]
Message-ID: <20171124073417.4342-3-peterx@redhat.com> (raw)
In-Reply-To: <20171124073417.4342-1-peterx@redhat.com>

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>
---
 exec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/exec.c b/exec.c
index d845542139..41f89f8164 100644
--- a/exec.c
+++ b/exec.c
@@ -713,9 +713,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);
-- 
2.14.3

  parent reply	other threads:[~2017-11-24  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24  7:34 [Qemu-devel] [PATCH v2 0/3] cpu: suffix cpu address spaces with indexes Peter Xu
2017-11-24  7:34 ` [Qemu-devel] [PATCH v2 1/3] cpu: refactor cpu_address_space_init() Peter Xu
2017-11-24  7:34 ` Peter Xu [this message]
2017-11-24  7:34 ` [Qemu-devel] [PATCH v2 3/3] cpu: put AddressSpace into CPUAddressSpace Peter Xu
2017-12-20  3:13 ` [Qemu-devel] [PATCH v2 0/3] cpu: suffix cpu address spaces with indexes Peter Xu
2017-12-20  8:56   ` Paolo Bonzini
2017-12-20  9:09     ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171124073417.4342-3-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).