From patchwork Fri Jun 26 15:13:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 191845 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp592936ilg; Fri, 26 Jun 2020 08:32:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6Clr09l+2D9d+RjYlZhGBFJ+jGXxfsUbJgz5bP7+YBNGUabhYoZebmFuE4sNMb/J3gEF2 X-Received: by 2002:a25:be11:: with SMTP id h17mr5761167ybk.179.1593185522404; Fri, 26 Jun 2020 08:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593185522; cv=none; d=google.com; s=arc-20160816; b=AsiSkhdWHT5b1sxI+sS9WfvJAFFrKiq9aNk9zNAfH53piKsZMIE0AEKhPD5AedPnfH yIK9sy4cTpaUQ6WfcFR3B6/83zahnEXk873VG59CKQrSapDdkOtFM8megK+qQVPH533j lhLz4gHSA8vGyooUMc40UzyvpuZSDLTNQ6PksWaT7StXajy6ghk8ZD+Mq6S4R4G6e5rK Sc2rPANDEnY9/ryiSeNGcIY4aFcRsptvlxq070FtGqBnnSWz4onUL+IbwAnjs5jfJZLb NQ5STWD+WauGZU0wQzJ+UAWlrRNydOlg3zD89ONQF4Ywd+afJgQuhnL0zd7j7YLFq9Qs g3NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=0jclhN1iI8Ils0M7tH4L8prj0mKxUP8gosaZhHheF7I=; b=dTFTCszazE78bL0ZXJNj5Mx4DdpwkmDq1oE6KA0sBd5fEpyWWOjPwad1OT2lMkm+Xg ORY39+Cy8kmHFSwWVA+z49nl8mH6bc5jgaLRcKcFDVaouvFNS9DZqMjUX1gQAhSisT2o rE/CRBwFfMGhB+TQ3X3KjBynTq/GiZL3C9sB3ixcUWPRSwdT+/m41Rvfjwa/bAJrUlpT Lqp9otPoiQ9TP/uzFzDTPxqXboJefFks3tzXagJxRXPZreoWnv4Rc7SJNNuXNvn9XPD6 7fCt7P1pVdPxsOi/EZY16zXaMIiPY3wrM70y+kyDGxMn+sIBlMTAbfjQ2PikKOsNYARG zNcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HASE1GBT; 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 r30si4696581ybd.146.2020.06.26.08.32.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jun 2020 08:32:02 -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=HASE1GBT; 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]:58896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1joqKf-0006LY-Jq for patch@linaro.org; Fri, 26 Jun 2020 11:32:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1joq42-0002CQ-Cm for qemu-devel@nongnu.org; Fri, 26 Jun 2020 11:14:50 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:33991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1joq3x-0006JC-99 for qemu-devel@nongnu.org; Fri, 26 Jun 2020 11:14:50 -0400 Received: by mail-wm1-x32d.google.com with SMTP id u26so9095741wmn.1 for ; Fri, 26 Jun 2020 08:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0jclhN1iI8Ils0M7tH4L8prj0mKxUP8gosaZhHheF7I=; b=HASE1GBTZmsW0//eemhsZdvHpYvDq7eTQhv0Pxnxuz2yMkdcE7TajImcK5b5ng01ZY 858zW3VEdnaz/iWkxeRKTYN617GAYSeTfGbUPTYFpCOh7wwlnUPLJQTtdA4djQbj4zoY JvMbpELmCVw7N2jLYuY+RzJfZ394ig41hNSYLWexSu1lVtBg2BjYQ03vXXONGs6TAZCu qZ/57pvNSFy+AKMdi/im9DFMQrBc2gx2aLPHY4YYkqWfsziLTkedKAIba1icFRL4AxTH Ww/8cVNRPMBceS7nhhDAsRVsC8u1+35p6jBtExMtgyMZxUZvdNOTj51//AWvQKjyOKE4 z3jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0jclhN1iI8Ils0M7tH4L8prj0mKxUP8gosaZhHheF7I=; b=gP4s8PuQ2YEoc6A5ibUsBPoFtwEtKN4TJ6v3gIh3wp9oYBekDt6GVbVakhLbkQGHSv Vtpno3xtjcYZOD8v5w18u/QlkEHf5bN/fYvUtNwbkF7zt16xzZzajxesDg47C6LTsstT fRuFRR0Tz53ZEfyry/S7/0bM5vDwGG4YZvurJr1x+HMdIMfYhBZ0kYKSe1qOsqU1Zwfz tzq6ah98t7UIgzYty4AZetAWsd/ntSn+5HqKqtLXvkf1dSZV4krcpLovb8buMHCrwkwK FC2HTLuC/RR1ZIYmoKd8CO0XSrBRo5rGZ5wP8btItp0EA7k+s/vPCc+LkXXYoP1f1pT0 7XEQ== X-Gm-Message-State: AOAM530xNf+gyxk2RUSCLygzeNqE5mPlaAl0KC4FkUP4+Hv+dpPmWh6k B8OSk4A83ET/tQzDKolFRntrfHjJ5e/1Dw== X-Received: by 2002:a7b:ca52:: with SMTP id m18mr3919302wml.92.1593184481073; Fri, 26 Jun 2020 08:14:41 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id w13sm37838852wrr.67.2020.06.26.08.14.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jun 2020 08:14:40 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/57] target/arm: Add isar tests for mte Date: Fri, 26 Jun 2020 16:13:40 +0100 Message-Id: <20200626151424.30117-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200626151424.30117-1-peter.maydell@linaro.org> References: <20200626151424.30117-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20200626033144.790098-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- 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 cf66b8c7fb0..ff70115801f 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3814,6 +3814,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 &&