Message ID | 20190211235258.542-28-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3217629jaa; Mon, 11 Feb 2019 16:17:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IZi6focVIGm1nHQ3Rn4evI8RaTQS9ALDsPTsoP2cp6eJDwyclGIgYK9BcC0tEJysR7ulXOR X-Received: by 2002:a81:2982:: with SMTP id p124mr704161ywp.273.1549930623488; Mon, 11 Feb 2019 16:17:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549930623; cv=none; d=google.com; s=arc-20160816; b=Mpu/MiFpOIBeZ2Z8l5q8QSIgdAaa7tbSAxrhoZDAk3jbQ3AyhjYlP48HD+D+G+z55I /QVsOlZj15w95PQODpOajva0/fFZuh5iuHEk/rSjaRJMg7s+/EHGH2tWFqu7O7wOeMMs iGCjF4nTj3Pb5Uz0+/RyMoFvkOVODUWxpcZE+yf60nd2DKuSgeOEltx9bQjc2IJArg+N V19jTzuGCKMVNXwKfLLkfBBRmXQwiqSY4geub0ZCwEAcFOOA4REdmQFM9pZsbm74Oyll wLm1chSLvwPvTIR8Lb1s4H36cZKQr9RjCWXn+Rk5A0Qnk4labdZHZUnsztKalQHCgq+O PDng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=g7oNh1d8VWGEQw+YCuZLsLZ9OlLSdLVyb8nPu7OZ0AM=; b=ik3JB7RA5NIVV7D5UF/8+92PBT4IiLnVPzlAlV0/mtgn9391f0vW2jHhN3RevWjkf/ eSqOVBM+7V8vW/nHB9hooRG3zFgwy04DYNDQr+f8i0K9HCl5ZRcEHfRdKUSAAcyb2FaA +F1szZOx1APSHa38RZdLuZ2X+ZXTilk7JQdRzg8vsRK5ReSk+LZ1+zYwk3BsMWqvyCCt 5opkYXKpf4Lomgb9YtdvW5VfAXvFB8EQCbCWWpi6rBSuMISy+8gd1TnZx4yTBSSgzjE3 0p9fgCO1HHdFb+3OZsaOoQhCYSzpqEPe3QEPSkA04ieBDtjt6wK7a1RXaIH866NzpzpX kK/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="W1/tgCF5"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o20si6842186ybg.425.2019.02.11.16.17.03 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 11 Feb 2019 16:17:03 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="W1/tgCF5"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:58547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1gtLl0-0007HM-W8 for patch@linaro.org; Mon, 11 Feb 2019 19:17:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gtLOh-0005rM-58 for qemu-devel@nongnu.org; Mon, 11 Feb 2019 18:54:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gtLOf-00050u-CV for qemu-devel@nongnu.org; Mon, 11 Feb 2019 18:53:59 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:46111) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gtLOe-0004kH-Ub for qemu-devel@nongnu.org; Mon, 11 Feb 2019 18:53:57 -0500 Received: by mail-pl1-x642.google.com with SMTP id o6so315373pls.13 for <qemu-devel@nongnu.org>; Mon, 11 Feb 2019 15:53:37 -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; bh=g7oNh1d8VWGEQw+YCuZLsLZ9OlLSdLVyb8nPu7OZ0AM=; b=W1/tgCF5U4YtukldkxB1PagvZ0FLkJZUzhnU3ZjVhiuaBL20g06kGBa07g+VKlGSFs W40seklOowkg7Sc0MdHkKPQcz6w9FxoDAO+aQN1oGnFqnvhJn5Om+y4OJQ5OtsSmzmqf ulvLLGoteMCtHlHLktohNii6qJ9grcEoLXMIoSZncPVTXrgLtPxxix0+8ep+jmumBvQ5 8erevH4S1OZeEagNrwRpX3cLwRZZbWx9/Tzrsyaf6ozCKVPE2o5Vr/QZmKzgpWVb6RrD CKrOYsdUNZIA+7CzichGB8LJPBa1HKQyc13ot27/wcpqbtnv1eKTPJkt71Rg/huepOaW 7uOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=g7oNh1d8VWGEQw+YCuZLsLZ9OlLSdLVyb8nPu7OZ0AM=; b=H6YXKH4CZixWN/0SaL5/ixSxu/1cASZtowIvJwBmLxU1oVErjHlRoqMdmfbbvlVjqv clz0ddTYs7KfluK+dHSYXuLQ9R+CMUHHnfQFVG2VeuBQWEncf6YJ1+FGYAf4w6dNAY2Z 1EKjRQ5+oitBXDBSUAMRv9qA5rcLUkeEN40+9dKM7sDx+D6On9Y6O3+ugt+Ch4icehT+ ffP19tO/uOMnsZyjEGSVB0jspfteEFHUmT3zmG1H/ZIsk2fnubEoa/1hqjOo5NKCCFyC WY2VpT/H5BFzhAh9br7M+PyXr5r/5A69YUBX/riuVEvZkLaRFv/rI6N+OUZQZTqv9MdC yn/g== X-Gm-Message-State: AHQUAuYzwYCmY1Nsw2SY9T1lZ4bkL7eC8swwRf6pQx+BBGJ6e1KR2el4 aG22bgfoZUJTyd3S1irtOFSyDOL3CNA= X-Received: by 2002:a17:902:9008:: with SMTP id a8mr971403plp.38.1549929216742; Mon, 11 Feb 2019 15:53:36 -0800 (PST) Received: from cloudburst.twiddle.net (97-113-188-82.tukw.qwest.net. [97.113.188.82]) by smtp.gmail.com with ESMTPSA id c4sm11861031pgq.85.2019.02.11.15.53.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Feb 2019 15:53:36 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Mon, 11 Feb 2019 15:52:57 -0800 Message-Id: <20190211235258.542-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190211235258.542-1-richard.henderson@linaro.org> References: <20190211235258.542-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::642 Subject: [Qemu-devel] [PATCH v3 27/28] target/arm: Enable MTE X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/arm: Implement ARMv8.5-MemTag
|
expand
|
diff --git a/target/arm/cpu.c b/target/arm/cpu.c index decf95de3e..a5599ae19f 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -206,6 +206,16 @@ static void arm_cpu_reset(CPUState *s) * make no difference to the user-level emulation. */ env->cp15.tcr_el[1].raw_tcr = (3ULL << 37); + /* Enable MTE allocation tags. */ + env->cp15.hcr_el2 |= HCR_ATA; + env->cp15.scr_el3 |= SCR_ATA; + env->cp15.sctlr_el[1] |= SCTLR_ATA0; + /* Enable synchronous tag check failures. */ + env->cp15.sctlr_el[1] |= 1ull << 38; +#ifdef TARGET_AARCH64 + /* Set MTE seed to non-zero value, otherwise RandomTag fails. */ + env->cp15.rgsr_el1 = 0x123400; +#endif #else /* Reset into the highest available EL */ if (arm_feature(env, ARM_FEATURE_EL3)) { diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 53a7d92c95..7bd761b8f5 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -352,6 +352,7 @@ static void aarch64_max_initfn(Object *obj) t = cpu->isar.id_aa64pfr1; t = FIELD_DP64(t, ID_AA64PFR1, BT, 1); + t = FIELD_DP64(t, ID_AA64PFR1, MTE, 2); cpu->isar.id_aa64pfr1 = t; t = cpu->isar.id_aa64mmfr1;
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/arm/cpu.c | 10 ++++++++++ target/arm/cpu64.c | 1 + 2 files changed, 11 insertions(+) -- 2.17.2