From patchwork Thu Mar 12 19:41:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 184503 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp950620ile; Thu, 12 Mar 2020 12:42:42 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvcmkL3UZ9tK1SiVRiBDCVBl12jve3IQFk17+YIlkGV9QCXdKravszg1MMxbZIWV9vRiMdF X-Received: by 2002:ac8:6b87:: with SMTP id z7mr9296023qts.52.1584042162836; Thu, 12 Mar 2020 12:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584042162; cv=none; d=google.com; s=arc-20160816; b=DEqH/jYdgwnyV+NRCJ3uXpzzCWHTwKabWaZPEmBzIWo3QLVDv6S2qs4ZGcM49Zamr4 ufQcqHMW99opFMlabT3PZen2xLKLLAVbwwZj+2cgr9IEZ6GYKelG1i24JOraPGPrsa0G hHbB0nLYPamyRE2Ub7sj6DDxxcWmxTerDCqGPTuF1cCvtM25x6DK0rcEUkwe2ZMzIsY2 oq4vMfCTXnlr/WQ7u7gYbwYcpAxr5LtAAWzDvg81lvIgCU4o1AtA4HCNmI5ynW7ynAj4 UDcS+39CzNBnICGjhZRLniRQXI7ActPm4bc1uIPMpmJz4uaHpAzJ8xuHG46BJqiFVKLk 2tHg== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=X41LntIfpFnOp1tmXD1Hx9tL8xRzEZP+j1F/1N0KBdg=; b=INq2Fyiwfo7eACi9nAYCHDi4suxjz/Wi4vjXtS0RdX+WBK8Qng2zi7BiQ3ObzzxLK9 poRFy2w4RGkMATYfKB+hSfonR7j91pN9owYb2Ehg1TrbO5/3AHmasRx6XhgNrGWYOANW Ij9h63vPlNqPcMl7i343PeohMJbxWLA3Ja1hNQCMwER53hWmxT5+qt98tunI0QzylXeJ pDAQTZimNFNAFMRd3FjgaqIjfn16weOoe1S9Cem86kzR+EBNaYmCtU5w6RI8G8y83Cmz 1cm8NL8kUkKSBXwB+z3FFbullIlGDjruzK7dBVz/ZqDQMWX1KY4emD17hFOCipjOf9/L rnxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YvaIySu4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h8si3008925qvj.192.2020.03.12.12.42.42 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Mar 2020 12:42:42 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=YvaIySu4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCTj8-0004eH-2g for patch@linaro.org; Thu, 12 Mar 2020 15:42:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44942) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCTir-0004Y0-JW for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCTiq-0001em-G2 for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:25 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:52933) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jCTiq-0001eD-7D for qemu-devel@nongnu.org; Thu, 12 Mar 2020 15:42:24 -0400 Received: by mail-pj1-x102c.google.com with SMTP id f15so2968038pjq.2 for ; Thu, 12 Mar 2020 12:42:24 -0700 (PDT) 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=X41LntIfpFnOp1tmXD1Hx9tL8xRzEZP+j1F/1N0KBdg=; b=YvaIySu4S+qagbhGEolpvRxDVWQr7YGrPXgAmtn6YLYp4OCeTISuJ8hj5xcPenA8ws dvBl0XE4lvnDy4KSkLJjlyOts0c3PJjB5L7qD940RHPbw53Eajd0QSXVc9bPA+fCevsf OBF+N+QR+nNHGevuFZ82mp/dHo536EH4zvaz7TK1ccW+Zm8khkhUfyX2ghRz/TiiuT+f 3U9CxZAs0hwBTxImWD7EZnPI2U8SqmKCI2Hz6jAq5YqlLhzuzlq8UqJtLPtJQD8SJcmv cXpf79bgY6hYZrI5AA/efqUNILKkRpXSNx4BORcsgyWCvSzVP87d+4JIx13+jYGOQ6PZ +bnQ== 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:mime-version:content-transfer-encoding; bh=X41LntIfpFnOp1tmXD1Hx9tL8xRzEZP+j1F/1N0KBdg=; b=O+L38YnJrJ1OQEE2cCrKYDU2EBsm2CbZHR4SlVOllaQzDy/vTNhBlpLxUkyx00DRcc y5za1UF9itfvu9gHEg3154zKzCAMxHiLDwS5OKOaLLf8iipXCKO/yUtTT7ylD77i9Gd5 W2p9qthBwtH2aqP7CyXO187H55md8zTLFCfEqBjZn1ZtbF9gwQLIKotjO4n6Kfn0aW6o zcOpmznB7uYNt/mtNM23eTihmFCGtWE07KipAmooMafheg3O8cv+e5HCc5CI0KMvodCe gDDAGt/OavnwpZMeCPVV/0DhHnrcoqhSRtI2xKDJU0vOoeDrVwdc0tMjB7la9BwM44kk G6Xw== X-Gm-Message-State: ANhLgQ2APuVk2gnS8UsfRZ4MXyPVjJ+mBTgNYAW8JoIML2i+Ims8ru5O 6t06tX4MsDIP0iCPPhoxr+jf2m9eZwE= X-Received: by 2002:a17:90a:d585:: with SMTP id v5mr5827956pju.4.1584042142715; Thu, 12 Mar 2020 12:42:22 -0700 (PDT) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id g69sm6824842pje.34.2020.03.12.12.42.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 12:42:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 01/42] target/arm: Add isar tests for mte Date: Thu, 12 Mar 2020 12:41:38 -0700 Message-Id: <20200312194219.24406-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312194219.24406-1-richard.henderson@linaro.org> References: <20200312194219.24406-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::102c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/cpu.h | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.20.1 diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 4ffd991b6f..a77b0d97ac 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3777,6 +3777,16 @@ static inline bool isar_feature_aa64_bti(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64pfr1, ID_AA64PFR1, BT) != 0; } +static inline bool isar_feature_aa64_mte_insn_reg(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64pfr1, ID_AA64PFR1, MTE) != 0; +} + +static inline bool isar_feature_aa64_mte(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64pfr1, ID_AA64PFR1, MTE) >= 2; +} + static inline bool isar_feature_aa64_pmu_8_1(const ARMISARegisters *id) { return FIELD_EX64(id->id_aa64dfr0, ID_AA64DFR0, PMUVER) >= 4 &&