From patchwork Thu Feb 13 14:41:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 183359 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp618520ile; Thu, 13 Feb 2020 06:51:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwqjnu1xwFfbQnL6hVs/Crbx3KESq6e0D/7Bb9dMjn/ytl3Ipd5CQy5mmCNLyQvAYN/CPxk X-Received: by 2002:a0c:a281:: with SMTP id g1mr11996327qva.168.1581605507102; Thu, 13 Feb 2020 06:51:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581605507; cv=none; d=google.com; s=arc-20160816; b=FSQFjN8M/wr2zviDoB5ih4Yqq7Ts33dmufdgM04iPAEzdcgFq7M9Dt8NoU1rWIRNCS 4zazSsHDBuSDw8fVZ6fSmVX5p1pCnde+i7dtehI5I6yfuJnfMcbJ2/8q+8KTgR9AU6xD DgdtH28eVcnM4yrEiTUvRqqYOO2UNeMf06063BBBdanTjgRBaKiFLWtQDFJb8TgLkmCs NKZLGUVEWsUs8Vba1PAMiCA+OdxxkINY38CVb1i5bVw/7sbdowsGkKo0oP1/P/vhgC8N /TLdSh/IvuOdZoogEZvhWcStxJI/6NsjXwEoS0o7P1QH48aGgaoqQe5LL2Qcsd8BSBvP 6zdA== 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=rmiH96/cndBLaHM0LWVL6bzqgE3M22u8BWrhcwmNQ28=; b=zdWHWiyyStFQ1pcP0dDny8l8RdMoTmYcXQPSWSxrzHfyYREPsrguALag0DGxlTX7ky liO2Wb8C2ZX648qnpYTKQ0OurFR/ICZyQAph8G+4MZpr84c4hMSWxnJ/MAvcZVZffeCm 21qtmcoMZ3MFxIv5TLv7Yhvb/zAFD3AUGRHiy6Dax8BTJPwRO1ghk7OPcyReOH1Bi0Sx 900rQQ6yVYhf0s8xZWfUBsxN0sQ3Put5ns/FPjl5l5OuXxVlZX4pGeQxBZTp5Q9Ut0JP XwLxpusc9W4W8iQugSyKiRWQ2Y3IpBiEYKrszeX39aElKfQHUFd60Jjw/Lr1ZQO763n1 mHCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XwIWoKCc; 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 b14si1341484qkj.129.2020.02.13.06.51.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Feb 2020 06:51:47 -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=pass header.i=@linaro.org header.s=google header.b=XwIWoKCc; 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]:53930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2FqE-0008AA-Hl for patch@linaro.org; Thu, 13 Feb 2020 09:51:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60223) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2Fgw-0004M6-Um for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2Fgs-0001ob-R1 for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:10 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:54381) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2Fgs-0001kC-JL for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:06 -0500 Received: by mail-wm1-x32c.google.com with SMTP id g1so6528815wmh.4 for ; Thu, 13 Feb 2020 06:42:04 -0800 (PST) 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=rmiH96/cndBLaHM0LWVL6bzqgE3M22u8BWrhcwmNQ28=; b=XwIWoKCcD+UrEnxAOVpdW/CvkkrRePkXQWhg5NtU1mKPqZr55FjZfMvqWFOTbCZnN5 UoItpMzzbxCAuJCNWwfHgZ1Sz3YjjO2TIS87SVMP3xtBrvJKDgxlQhz1gZshervX2mUD Jn547f6lVDMyW29nscqZaskinPcfOwq7OLRLi/0L618jkNk4G31fUI1aCVNavs4JFa/g ArVY+cv33EM3cS0kDUE2XNiNrm7lC+kNvZ/k9U6gEx4klO6z4vz5/6in1RbCPTm8P+xK CeKWhqzvcfCZhTxZt2cs/VVHub70VLutMVatGpFzY7MyYLSUMkZqHaFTDG0hLsFJ4c/x sZBg== 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=rmiH96/cndBLaHM0LWVL6bzqgE3M22u8BWrhcwmNQ28=; b=Edb8B7ee5r2Qr8neeqHIc1bNUA5rM9crNwBVUqqt2PK1SqKKvZynj9LLfzMKe3QCRH DDjFw05JRU0WAhx1dQcwOBeGy+AaIFtsqYTWAchYGiPgMsoigf2LrTDuXJKgPdt+mULx IFHfUlHDlKIQVuiUdp08yIomm7EG1vP5/qoQZ6ILB6E2Kv64LIKLpyvO8Jw7gNw/6qKT pNbmZXp1Qv3V8awF5w91uM99mXdgs8VvPaI8cdqlLzeXkDSLGvBdAfgvMh3z2UTD4gwX 8/Sx/pB17crbhrhBdusg/9m+yeMh/2eqadfZv/o8ekWXTqiNfKAtBqJGzM5Tbr1STRJv viAg== X-Gm-Message-State: APjAAAUIAHEV0EiFAusvCwao5CCWWZztqBWR/0RPfYbabE7gs3FS/zQ8 loZUmCBRYSLAmiNyChpWvDB+ismiIdM= X-Received: by 2002:a05:600c:211:: with SMTP id 17mr6140547wmi.60.1581604923152; Thu, 13 Feb 2020 06:42:03 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id e22sm3362454wme.45.2020.02.13.06.42.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 06:42:02 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/46] target/arm: Add isar_feature tests for PAN + ATS1E1 Date: Thu, 13 Feb 2020 14:41:11 +0000 Message-Id: <20200213144145.818-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213144145.818-1-peter.maydell@linaro.org> References: <20200213144145.818-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32c 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 Include definitions for all of the bits in ID_MMFR3. We already have a definition for ID_AA64MMFR1.PAN. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20200208125816.14954-4-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 2.20.1 diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c63bceaaa5f..08b2f5d73e4 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1727,6 +1727,15 @@ FIELD(ID_ISAR6, FHM, 8, 4) FIELD(ID_ISAR6, SB, 12, 4) FIELD(ID_ISAR6, SPECRES, 16, 4) +FIELD(ID_MMFR3, CMAINTVA, 0, 4) +FIELD(ID_MMFR3, CMAINTSW, 4, 4) +FIELD(ID_MMFR3, BPMAINT, 8, 4) +FIELD(ID_MMFR3, MAINTBCST, 12, 4) +FIELD(ID_MMFR3, PAN, 16, 4) +FIELD(ID_MMFR3, COHWALK, 20, 4) +FIELD(ID_MMFR3, CMEMSZ, 24, 4) +FIELD(ID_MMFR3, SUPERSEC, 28, 4) + FIELD(ID_MMFR4, SPECSEI, 0, 4) FIELD(ID_MMFR4, AC2, 4, 4) FIELD(ID_MMFR4, XNX, 8, 4) @@ -3443,6 +3452,16 @@ static inline bool isar_feature_aa32_vminmaxnm(const ARMISARegisters *id) return FIELD_EX64(id->mvfr2, MVFR2, FPMISC) >= 4; } +static inline bool isar_feature_aa32_pan(const ARMISARegisters *id) +{ + return FIELD_EX64(id->mvfr0, ID_MMFR3, PAN) != 0; +} + +static inline bool isar_feature_aa32_ats1e1(const ARMISARegisters *id) +{ + return FIELD_EX64(id->mvfr0, ID_MMFR3, PAN) >= 2; +} + /* * 64-bit feature tests via id registers. */ @@ -3602,6 +3621,16 @@ static inline bool isar_feature_aa64_lor(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, LO) != 0; } +static inline bool isar_feature_aa64_pan(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, PAN) != 0; +} + +static inline bool isar_feature_aa64_ats1e1(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, PAN) >= 2; +} + static inline bool isar_feature_aa64_bti(const ARMISARegisters *id) { return FIELD_EX64(id->id_aa64pfr1, ID_AA64PFR1, BT) != 0;