From patchwork Mon Oct 24 05:18:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 617844 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2512195pvb; Sun, 23 Oct 2022 23:07:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6FqavCIi7RLhyy0sdjefKN2sJvM7ltk5/m/HwSmnSdSVDAVqhZ80Ef7TEyjD/qAMVaE700 X-Received: by 2002:a05:620a:c4f:b0:6cf:8135:e803 with SMTP id u15-20020a05620a0c4f00b006cf8135e803mr21922741qki.67.1666591657279; Sun, 23 Oct 2022 23:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666591657; cv=none; d=google.com; s=arc-20160816; b=AM6KWKrfZpL9IKt2a2tjFzJH3GjcrlwtDXqr5K8KcTBrzs0NxvTjovtWekRjtQyWGA Adhfo0f3Sfgtlrosx4qjlbVwXn3MvsI9HleVG+OEPgxQB3HO6ejcNbmBDG6+uZ0lcE9R WOaxkG7PUyrWZSF7wfj5ZBNjzaTU/KJrtVVB9UZrTJMofNXD+SYrlEspg/f9sCnV5g0t TOEtnaZOAff4RxPGbo0fG4rKel6r/RrMIUAc4fw36eInTWv/+voyGSq7Mil9XwKbIFX8 bLCkpS1tCF9NvpSnSQ8sp01Xd2IBAT+hF8JPl3rpq7TH9D9hHDNk4PqZfVRRqSGPrnRT v+Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender: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:cc:to :from:dkim-signature; bh=xwpoipf+qBrSAl33zLnSt6wN4K7EGIfNiIUVkyXEfCo=; b=YeMaZqrh2+Ihz8DzKkAKn5tW70zF8pGyGu+D2mljN1Fy62uO+vwgowR78btA+EQlS5 MFNzDh+c5Y5h/xSxP24/9PMz6LZM8GrmKWqd09LX8x20fZr7eM9PXqbSMgUNrX7Q5mKw bR8PaYKREE3xt5/W0M05CsT8N5Fl6yhjSYh3nyORIzdPAydF4e2dFhrJxg92oHMAyiGP 2B9tUkpIIPJyBMfSPNkIV8GA6s8LJWB68ecvW7tEQC1H5pj3vIDRhnAWqyoK4ub1cnDp 1vbCApIN0T8mv6z8QDhU3CQmUg/h+reHrbpZVQ0EXpGBw7BNN/B92MqCjiWRxXftmhaj OYbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dbfi46uB; 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 a12-20020ac8108c000000b0039c0c68fd90si15303855qtj.207.2022.10.23.23.07.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Oct 2022 23:07:37 -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=dbfi46uB; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ompss-0007WM-Ew; Mon, 24 Oct 2022 01:20:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ompri-0006ZH-VW for qemu-devel@nongnu.org; Mon, 24 Oct 2022 01:19:20 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1omprf-0002K8-65 for qemu-devel@nongnu.org; Mon, 24 Oct 2022 01:19:10 -0400 Received: by mail-pf1-x42b.google.com with SMTP id f140so8141056pfa.1 for ; Sun, 23 Oct 2022 22:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xwpoipf+qBrSAl33zLnSt6wN4K7EGIfNiIUVkyXEfCo=; b=dbfi46uB/7gS8ippsDDPhZaM5XIwv8C8/d1kVqkcpxlsE+qzNODqsqFISf9M8dQd+s gasowfX0iZwEFaTpDb6QaV1bK9WYXptzqRX7PCmLll9kAF2nDqf/0olhEO7JW532l7zj jOFEA0oLX8vkFj8kXvMRzKTTPDqylXx8zEUsLFZGR9tXFt+Zn0L4MTQ2yKiohXvsxjP9 BiEMs1t251nMEoDnbK5xD6MNyeNYSHvFsHabW/vTx56qPSOsdTZiZ0rEydj9B+r806Bs vFu8Ic879Phb6qQDxcpVjj8cKyP1JJXuJwvbS04oihKB1lpfB+Kl/Ezg9aVHntz2+I8/ jyEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xwpoipf+qBrSAl33zLnSt6wN4K7EGIfNiIUVkyXEfCo=; b=FRP1xh2bVHcIz89sS4uSxEa6mOuUmh8F5zeOtq5Det9Jz1e7tzvrDDJOH5h+tFhvn0 XpjjQpj64GHWdD7j/K45OZ33oraiUJ5AinzTTFrhRdyEs0Epuj00iiJWsZs1nOaka68y sW73x9uMRlm+yxVidT1rfmrv4u7lU/t7fSRo6U69WFbuk08DPBVpmjhuLJ4NiXLTqZxu 84oWQTCgn+/QJEluVY+yWa1wfgg9Qdhxe16qE5ovIn3RbAbt1wyICOOfXym2STW42fO+ NaIXGu+XVg53P9jXmcKZE/kh9zHAekPg65UBb4N6tHEzFJxONXRdFrt2vTnELtUsPcqJ fH8Q== X-Gm-Message-State: ACrzQf3ozytqROTkUpMyWLYOAOrBF8w7kUzw7U2t83CeWwIyZAmdppWp JQ7A+4ds/x8X1dXC98/AuVTJCa9lbRFoRMgg X-Received: by 2002:a63:54b:0:b0:464:8e6:11e7 with SMTP id 72-20020a63054b000000b0046408e611e7mr27325447pgf.212.1666588745685; Sun, 23 Oct 2022 22:19:05 -0700 (PDT) Received: from stoup.. ([103.100.225.182]) by smtp.gmail.com with ESMTPSA id q12-20020a170902f34c00b00172951ddb12sm1895231ple.42.2022.10.23.22.19.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Oct 2022 22:19:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v6 03/14] target/arm: Add isar predicates for FEAT_HAFDBS Date: Mon, 24 Oct 2022 15:18:40 +1000 Message-Id: <20221024051851.3074715-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221024051851.3074715-1-richard.henderson@linaro.org> References: <20221024051851.3074715-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.google.com 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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org The MMFR1 field may indicate support for hardware update of access flag alone, or access flag and dirty bit. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 64fc03214c..0eeb4abe53 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -4139,6 +4139,16 @@ static inline bool isar_feature_aa64_lva(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64mmfr2, ID_AA64MMFR2, VARANGE) != 0; } +static inline bool isar_feature_aa64_hafs(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, HAFDBS) != 0; +} + +static inline bool isar_feature_aa64_hdbs(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, HAFDBS) >= 2; +} + static inline bool isar_feature_aa64_tts2uxn(const ARMISARegisters *id) { return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, XNX) != 0;