From patchwork Wed Jun 3 01:12:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187403 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp69745ilo; Tue, 2 Jun 2020 18:13:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCBQ96rUzDUNGO8dKExa69f4bjBFDeGo9nGhQ8c5vh2CBxs289S+EUMAwkhEMt7n3fyQ4p X-Received: by 2002:a5b:10:: with SMTP id a16mr37916609ybp.262.1591146831548; Tue, 02 Jun 2020 18:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591146831; cv=none; d=google.com; s=arc-20160816; b=WXP3ImNt5St3D1LxQPORvdvnzZNEZuM0hO9Mj5YpjjeG2+z8Ngy6wpqE1lo1LdZBgY ITapbKwCfFdYTLbaPxCGFiCvwh9lj2k6t159p93JMlK2fWFBL/UKX4hDK2NTZZQheojZ u8dBbXSNR4S641r+J1AEqX4ZcSaNEPMSJiJE5BXckonswX76OoVYtu5m7UThZ1mnrXJc BeqekwTXaQtQsCthgpzR0n1AgUe/Vl4RbcCqOtQI0LrNCFpdE17jB0pKwWhpr9CUTKhJ ThtyMnrEcg/DrK3r738CPI08J9GRydZnwWnnGaaZBcS5v14nt2UKYeGScPKkA4lGfOW9 HOEQ== 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=OzobXxmD62KwDEFdjrZjAAighBDtrTCRu38jKjN27BM=; b=N1oPKZIQ90Z4zhuMDVKBycRDGVAimLrVgFosOPo9htlq7hbo/+jsQJtqoRTvvzLoHT somqoaFGu+HHUax3fZzvLCmoPVKgK7mC47R71GY4aDQonwNsY9dIK4umETNcgw+8ozNO LLJi7T0JoMxcA1zPuAVRqUxn+FNjdGJD4RxrYFD5ofC4dAUoEFTpVBodFfvvvWJrbjA/ VkriDophWXjSzgg3sWfIZg5YupbnDMuzncOOfVEoQlMqX8XPRRhmL0WsGpnO8fArUWPu 0Aaz2IVNV9HNJcFcpfwo/Vb4zaP1ofdjWBZRs2llAWifPEbdW/scFTZjNIK+75qcxxfk 4vWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZT0kiUc1; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z10si282334ybk.485.2020.06.02.18.13.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 18:13:51 -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=fail header.i=@linaro.org header.s=google header.b=ZT0kiUc1; 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 ([::1]:45644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgHyY-0003d4-Ty for patch@linaro.org; Tue, 02 Jun 2020 21:13:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgHy6-0003HL-Oq for qemu-devel@nongnu.org; Tue, 02 Jun 2020 21:13:22 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]:33855) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgHy5-0003U9-MN for qemu-devel@nongnu.org; Tue, 02 Jun 2020 21:13:22 -0400 Received: by mail-pg1-x52e.google.com with SMTP id m1so586101pgk.1 for ; Tue, 02 Jun 2020 18:13:21 -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=OzobXxmD62KwDEFdjrZjAAighBDtrTCRu38jKjN27BM=; b=ZT0kiUc1Ujlo87PPHi9f6LpaacySTV6JqK01cnZQbuxrdlllwF9L9JfwR+IPMtpQo9 eXepl4920HFBg9PcADbYfdDMUiWrkAwB7miHPLicJPYoAfuA5uS+IBaNwiIz2GEfyY1N 4eRMidlP2GNbGI9eliSbGzrbmGcDK7vInBFbC+LRLj6jICk16fXlncNUg+S6sNQ5/9pv xNRQTzxw5/TyCq7H9UFqX0eN+Ytnwn/pF/qHy/jc0iQ/HkwY2g32D/17tWj11D1Mo/CI YJrw1KFUk4VPlKKYqqi2PAIdVi7RY4DsjNQYdB9lSH4/EuHR8td81wRKHGHoA/adcsX8 AWwA== 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=OzobXxmD62KwDEFdjrZjAAighBDtrTCRu38jKjN27BM=; b=o4rhejfAeFClj0kSvyfi5RKNWS8cc1oOscy1XNLH0qunjlEgJLqLyhFTf8BVZnxu9l 5GJcWxWO4wC8or9IT2hAmjLkjr7LhefgL0jMcgtx9Lxam0oR/w/nAlpG5/x+s6DXucu7 uIIDuYGPq8y31EwDhAkQI/jQqHYG7AdSO96SjSdLjNmo+hhEOm7XoNYWGJ+SSD8KRWb1 zgLv4tH/mRacJ2BzA5O/TQ2/ZsrXChfk5UijCj8E0wN26Wm+1ruJRIJ7QC+OynOlkzEj yev22gSmrRoiDpDHKvaBTatNtoqxHmMCBSCP5CS1sGUsRjFiw/ehggL3uI0rM3gV1xYw Zx+w== X-Gm-Message-State: AOAM5323P+XBqa9CwkAPMfyZPNQhheCEUby4qWHKA1Sve7qi/i0urs5S MBVRRj/gpnRdX/HcvklGH3PeTa9ePGU= X-Received: by 2002:aa7:8b56:: with SMTP id i22mr20028587pfd.63.1591146800024; Tue, 02 Jun 2020 18:13:20 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id 3sm290067pfe.85.2020.06.02.18.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 18:13:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v7 01/42] target/arm: Add isar tests for mte Date: Tue, 2 Jun 2020 18:12:36 -0700 Message-Id: <20200603011317.473934-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200603011317.473934-1-richard.henderson@linaro.org> References: <20200603011317.473934-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.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_PASS=-0.001, URIBL_BLOCKED=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: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, steplong@quicinc.com 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.25.1 Reviewed-by: Peter Maydell diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 677584e5da..f8ac11e73b 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 &&