From patchwork Fri Oct 16 08:49:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 55085 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 53C6522EAC for ; Fri, 16 Oct 2015 08:55:22 +0000 (UTC) Received: by lbcao8 with SMTP id ao8sf22040602lbc.1 for ; Fri, 16 Oct 2015 01:55:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=1ZH2XZsW0fnn7+sV0mo8nqt+ZG/fqGlcUWEJrxxBhcI=; b=KcnW2n69X8jmRN03HJrtJrv6XK6j+v6scE6swCNK9VDvvfC6DDuDyeZuxWl7MOL7t9 Vo+2PpsRN5GqwbX9zWWScDxx59RiWf9Me5tOuc8XHAlw56AocqxEQlVNXOA9PnbJtJQm AoaImzFq+9FTVDVOBD2rZKz0g1JVNIS7QVl2zNufS7V8kGi/GyHmISzJYeWjOzD+wFy6 VjBJp31JPXxiJLcEG9bquDjlE0e7PhVKGJ0MBWX3tA04EpukFUNvdQwM3X+GWHZFrI09 YYaPBjVX5obK4h7EqiRp5/AMc7WVJGrtxbhnSkRY0Vn4KcJxYQEhn9b+QevxEeyisFzP fisw== X-Gm-Message-State: ALoCoQkd1QXFCndgCXWiuRsXSIRFHAgFG779NInzxUGJS6rS3bXsLZ6lFvt9tePvUicuL9Tqeoq6 X-Received: by 10.112.63.165 with SMTP id h5mr3382778lbs.18.1444985721301; Fri, 16 Oct 2015 01:55:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.165.212 with SMTP id o203ls250367lfe.39.gmail; Fri, 16 Oct 2015 01:55:21 -0700 (PDT) X-Received: by 10.112.62.137 with SMTP id y9mr7542094lbr.63.1444985721135; Fri, 16 Oct 2015 01:55:21 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id 62si4501051lfq.61.2015.10.16.01.55.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Oct 2015 01:55:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbbes7 with SMTP id es7so5957409lbb.2 for ; Fri, 16 Oct 2015 01:55:20 -0700 (PDT) X-Received: by 10.112.132.7 with SMTP id oq7mr7781688lbb.32.1444985720589; Fri, 16 Oct 2015 01:55:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1124296lbq; Fri, 16 Oct 2015 01:55:19 -0700 (PDT) X-Received: by 10.140.41.240 with SMTP id z103mr17372913qgz.7.1444985718550; Fri, 16 Oct 2015 01:55:18 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f21si17014270qhc.23.2015.10.16.01.55.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 16 Oct 2015 01:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:51786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn0nG-0002IU-5o for patch@linaro.org; Fri, 16 Oct 2015 04:55:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn0iW-0003ZL-5G for qemu-devel@nongnu.org; Fri, 16 Oct 2015 04:50:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn0iT-0006xA-Po for qemu-devel@nongnu.org; Fri, 16 Oct 2015 04:50:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn0iT-0006wl-Fk for qemu-devel@nongnu.org; Fri, 16 Oct 2015 04:50:21 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 1036592475; Fri, 16 Oct 2015 08:50:21 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-80.ams2.redhat.com [10.36.112.80]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9G8oCaQ010200; Fri, 16 Oct 2015 04:50:19 -0400 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 16 Oct 2015 10:49:27 +0200 Message-Id: <1444985411-17803-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1444985411-17803-1-git-send-email-pbonzini@redhat.com> References: <1444985411-17803-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell Subject: [Qemu-devel] [PULL 05/49] exec.c: Don't call cpu_reload_memory_map() from cpu_exec_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pbonzini@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Maydell 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. Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Message-Id: <1443709790-25180-2-git-send-email-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini --- exec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/exec.c b/exec.c index 7d90a52..ab5d8a8 100644 --- a/exec.c +++ b/exec.c @@ -601,7 +601,6 @@ void cpu_exec_init(CPUState *cpu, Error **errp) #ifndef CONFIG_USER_ONLY cpu->as = &address_space_memory; cpu->thread_id = qemu_get_thread_id(); - cpu_reload_memory_map(cpu); #endif #if defined(CONFIG_USER_ONLY)