From patchwork Wed Dec 20 17:14:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 10126075 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EA6C660638 for ; Wed, 20 Dec 2017 17:28:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D49402873F for ; Wed, 20 Dec 2017 17:28:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C966029243; Wed, 20 Dec 2017 17:28:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 76B1B29204 for ; Wed, 20 Dec 2017 17:28:50 +0000 (UTC) Received: from localhost ([::1]:60404 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRiAi-0007VB-Mv for patchwork-qemu-devel@patchwork.kernel.org; Wed, 20 Dec 2017 12:28:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRhyQ-0004jS-E9 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRhyN-0007Gk-Ke for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:06 -0500 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:43968) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eRhyN-0007GS-D7 for qemu-devel@nongnu.org; Wed, 20 Dec 2017 12:16:03 -0500 Received: by mail-wr0-x242.google.com with SMTP id w68so10469437wrc.10 for ; Wed, 20 Dec 2017 09:16:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=k+ykxptOtTBqrKRW+zLhA7DiT5++LFyCFidvL9aPQjg=; b=Y1oARqtbMzlcd56pq/E6UEDUQU/JvZV7LPgDmOJ9wE5v6kFjpkoxLsHi7jkWDJkHMv Ao8HEOV0EP1wIEcHJlhr8Nsybmm8vXcjdp+ZrK0A/kVFjZdphlFtthrgAQlYoqPKSEGV lTxz+ZwVNmfvpr/Q/1eiGiaBzKaGjfr1XfC7DXDLoAkUpbN1W+z34/I4WchKPaUDO/cA X/7o0EwzsAn6sJWbW4VY+e5ZOERsolEvDxyQ+iauB+h153pkf+UGbhYa6Y78QWIfeQFB SZa/Y0Y9RyRCO6etb6ckHRX49awY0x51mBxuAfEnRz/0N41Xo0pAgpvuHUNqtMLn7Q/p VVug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=k+ykxptOtTBqrKRW+zLhA7DiT5++LFyCFidvL9aPQjg=; b=nUMlI0cyclksyTHOTPAKZwLWB10cZ+rLAYnYfd1OVMcQY3kUOugSbouygwBqrZzFmz tko/hVdHi2M6BI56U+t4C1sCgParjIZVcmguE3f644qQZALmhIL9AEmR9p8I/rZe5KVI EqzcKma0kGVl+liQOp8QYsCaM421aR6rHO9Y7fNpmFLxT+37vWBvr+UnvsPhPuqxA8K6 oUuwRqq2/+6qBEjx1jE+o9xOvLzzIFb+X6RvqOzBqB2POanb6ly8AA335od48Tjp98CI +38ECIgnRnAhmiVEpYBsTrwPyvcCl1voLeSD/GAT4qVZr2ISdPSFUdmOGWDHhbqM2pNf mJHw== X-Gm-Message-State: AKGB3mLBR8DefRDSE1rTOmO2oDZhRAV6eI8Aihq1TKAT3TKq9WT+tZ+Y 3iOyr5dlOCbpT4yY8Gpqb6nNIq+M X-Google-Smtp-Source: ACJfBot4ac0WRkuldXSZq4TyT7S3S5Hch8vmyRuzg4BVuyGJMhfJIExqt71DRm0J84R0xjZUO5e6VQ== X-Received: by 10.223.169.183 with SMTP id b52mr9708130wrd.63.1513790162166; Wed, 20 Dec 2017 09:16:02 -0800 (PST) Received: from 640k.lan (dynamic-adsl-78-12-251-125.clienti.tiscali.it. [78.12.251.125]) by smtp.gmail.com with ESMTPSA id f125sm2751101wme.45.2017.12.20.09.16.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Dec 2017 09:16:01 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 20 Dec 2017 18:14:38 +0100 Message-Id: <1513790098-9815-27-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1513790098-9815-1-git-send-email-pbonzini@redhat.com> References: <1513790098-9815-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PULL 26/46] cpu: suffix cpu address spaces with cpu index X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Xu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Xu Renaming cpu address space names so that they won't be the same when there are more than one. Signed-off-by: Peter Xu Message-Id: <20171123092333.16085-4-peterx@redhat.com> Signed-off-by: Paolo Bonzini --- exec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 3ab515e..6b5828e 100644 --- a/exec.c +++ b/exec.c @@ -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);