From patchwork Wed Nov 9 14:57:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 81528 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp251126qge; Wed, 9 Nov 2016 07:21:16 -0800 (PST) X-Received: by 10.157.18.229 with SMTP id g92mr98679otg.186.1478704876857; Wed, 09 Nov 2016 07:21:16 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y46si73645oty.28.2016.11.09.07.21.16 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 09 Nov 2016 07:21:16 -0800 (PST) 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; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4Uge-0002lA-34 for patch@linaro.org; Wed, 09 Nov 2016 10:21:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4UKO-0000m1-Ob for qemu-devel@nongnu.org; Wed, 09 Nov 2016 09:58:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4UKL-0002MD-0k for qemu-devel@nongnu.org; Wed, 09 Nov 2016 09:58:16 -0500 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:35349) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4UKK-0002Ld-RW for qemu-devel@nongnu.org; Wed, 09 Nov 2016 09:58:12 -0500 Received: by mail-wm0-x236.google.com with SMTP id a197so312254314wmd.0 for ; Wed, 09 Nov 2016 06:58:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/ZIGQkBviwEHmdmVMhVmTW2/LhDnQ+BpChBv45hv0vE=; b=KFF5ij06PJahyYythqjLV1/0Co/YKV26H9sB8gwadMIxzQ+FSgxzewTueE+bmMGrs1 BGcQsYSKnDjpiWYbHUeO2u9rYoFlY2tVc6xv7Sde4SyJ698sqKvtRn7wwO0/kwBvE9j/ 3xQbAhifwyw13MIFgNVrlxqBRfzCtM+cp+JNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/ZIGQkBviwEHmdmVMhVmTW2/LhDnQ+BpChBv45hv0vE=; b=D/y5WnrNu0i/AFme6yElqSlpGDc2TlDPdsxCEn1Kd+OQzuMaQz2SvDCnniWngWg3hQ /TzagkbCd1Cd2vXamWOLKn1YgNylsH5URUIoY/1VCxWgXQYTLIYi6wwTrTlByradT2pK vGjeEGbfu3JUf88AnAfE42feWVqY22u3POpoTlc6NsAKFhUArbCs1w745z5cNlDHkRm9 mnlEIPVsoDVA7C74NE8ZDBl1ttJTokj2MTb/2/DpC6xZpXwvpX2KR02hw2Zt/IApnhJJ rR5Cmlc5du+Z98B2nfUgPuQcYprSGZzQScbSQXDqaT+OjchkmlQjzq1hKkxncF28AzOD lRRg== X-Gm-Message-State: ABUngvdVJW7P4/CRUpA2jGvWwfyIy9gPjKddwNs0g27lkb+aze4CtnN/heug25FvzznldJ5I X-Received: by 10.28.188.87 with SMTP id m84mr711200wmf.14.1478703491682; Wed, 09 Nov 2016 06:58:11 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id l19sm700880wmg.5.2016.11.09.06.58.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2016 06:58:05 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id E93293E0494; Wed, 9 Nov 2016 14:57:57 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: pbonzini@redhat.com Date: Wed, 9 Nov 2016 14:57:44 +0000 Message-Id: <20161109145748.27282-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161109145748.27282-1-alex.bennee@linaro.org> References: <20161109145748.27282-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::236 Subject: [Qemu-devel] [PATCH v6 15/19] target-arm/cpu: don't reset TLB structures, use cputlb to do it 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: mttcg@listserver.greensocs.com, peter.maydell@linaro.org, claudio.fontana@huawei.com, nikunj@linux.vnet.ibm.com, jan.kiszka@siemens.com, mark.burton@greensocs.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, "open list:ARM" , serge.fdrv@gmail.com, bobby.prani@gmail.com, rth@twiddle.net, =?UTF-8?q?Alex=20Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" cputlb owns the TLB entries and knows how to safely update them in MTTCG. Signed-off-by: Alex Bennée --- target-arm/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.10.1 diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 99f0dbe..990bcb1 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -122,7 +122,13 @@ static void arm_cpu_reset(CPUState *s) acc->parent_reset(s); +#ifdef CONFIG_SOFTMMU + memset(env, 0, offsetof(CPUARMState, tlb_table)); + tlb_flush(s, 0); +#else memset(env, 0, offsetof(CPUARMState, features)); +#endif + g_hash_table_foreach(cpu->cp_regs, cp_reg_reset, cpu); g_hash_table_foreach(cpu->cp_regs, cp_reg_check_reset, cpu);