From patchwork Thu Oct 20 22:35:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 616800 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp573005pvb; Thu, 20 Oct 2022 15:38:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5BIONSpzwoupyM89PMkFDtsiihrhjE9ZoPB19HgIMa8IU7i4jgXe2jnv9p0Vs2clKCYO1E X-Received: by 2002:ac8:5c4d:0:b0:39c:673c:cdba with SMTP id j13-20020ac85c4d000000b0039c673ccdbamr13474579qtj.554.1666305510398; Thu, 20 Oct 2022 15:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666305510; cv=none; d=google.com; s=arc-20160816; b=Cu/jDwYjXlPCRe3NIUhel2wevMAH1HrteArTffiGSER4w+Dk/XcWnJwUYKUuzQkWZY 8joNv/gYQsQui80/ekOOpUp3yO1GVGq7+1ADHfZ7rmyM8NKg/9vmm64Fvv4/HC1HOQ1k 8kMnuTOOErduAO6bxie/ZIljnFgOsgTzfoxBaGM1rqx3DWaz0BLbdtc8PJKTbqp1Cb50 tR5EpTsEJOh0VWCm6pCq4GLO4lX1/k0+pO72SxFnw5MfQzTQ5shfPrQzLp9iHq3lWjs1 ZimFSQtAHRhDvzVytvrtdHbJOQjBZpTPCCPWYg4CfVbXMXprGc31nXuDJ3D9LTbGjmVB WC9w== 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:cc:to :from:dkim-signature; bh=xwpoipf+qBrSAl33zLnSt6wN4K7EGIfNiIUVkyXEfCo=; b=sH0wVzHAA7l2VhsK3ND4NWPtYJYji/3ln98aHdBaCPsElpBT2mzfas8f24cZam0jYF DMdoPE9pD5S2cLW0ujEsLUo14kR/Tw1wqKjZsIOMzOQOFy99XldRqO4bmQD4ZxHGaDi3 hsyfO6K6uCi9DdZZXVM/I3b10y/jUVzk3+rNaAK2Jt7o28nGFBjY9sth0C23BEi2zICo 9Y+C2IN0bbaIGVpNVvJQP7JqqOnXrN3RcO7fScqyEqVKz7wfF/f0bI76L5evv9eKB676 Vh5stc6AoKQLihzhumFuuGjSKFRTL/RyKyUwUwS/FG3zDnk8RdYsgi7GctFkhZdycbKw niiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lmicci69; 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 m19-20020a05620a24d300b006edee0f497bsi13572203qkn.30.2022.10.20.15.38.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2022 15:38:30 -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=Lmicci69; 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=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oleBJ-0001jF-Vo for patch@linaro.org; Thu, 20 Oct 2022 18:38:30 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ole9k-0006Yx-GN for patch@linaro.org; Thu, 20 Oct 2022 18:36:52 -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 1ole9X-0006J3-M4 for qemu-devel@nongnu.org; Thu, 20 Oct 2022 18:36:41 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ole9V-0000zh-DZ for qemu-devel@nongnu.org; Thu, 20 Oct 2022 18:36:38 -0400 Received: by mail-pf1-x42d.google.com with SMTP id h13so857772pfr.7 for ; Thu, 20 Oct 2022 15:36:36 -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=Lmicci696IKMBvZgx93J+hVCqmL79oGx8gUoSuqD9GiOmb+XlY/b6MirgLdk079ec4 o7M11FedTnKDIOCeDn35vIOa0aiuNYPsEgPUbK3gGwVKSRrzPb0ldgp3KkdEiV17r/HQ 6ILqAIkWG4+vVZpxhgkLQkWy08oL06ANSCOhtywO77zy0+ZnBocAJb0U07KFhtJVlWMv wKqEKG4frpSubqcToPDzmNQeyCS24bS67u0qXOT6qgAb+iCzcjEVzgpF/pgu5OjtF/kL oyMMfoy3VXnDugcqxYfvL0jReopF5ltOaq0Hz5Dp8ep5WAzM/5AqGDNJ9xnrTo2osf1r y4mw== 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=yeT+jC2rWWNTHe8fY0G7HRJKqyorT9xiwlIDPdKHN99Ey2WUfeqhDzBVeRm737O3+6 5DyCagmE1E1DhMiI8zjwtC/3Sna4cbATfzx+86+AyRG1QH4qvPJXghfMO6OxuEP7ZnYX 3jT6UZVf/dz46F1J2JfzdeALFQh+QVRVzcRhs8F7SNh6CBAa9FX+V1olFemPwAPlrgjF SoJRqbCokgn8Cu3Ho0oGWuiENWzoPL6E4U75GYqi8C8tOwxxbyCRanKCnWLnps9VUB5L 5oPr0sKg6Fi7Y9H0OxGf7/+GR3CvnIijXnq0+lyCIzJnpIAvAFwPy/V15utFPUn/JFdr vhCg== X-Gm-Message-State: ACrzQf1Ln3iDgGUJFc96GPuYwbuDL/C7WlFHZ9Z2MpdKsCmHakGhAo/7 JsxvRRplPIQ66TrriMP5z7FSnwPy8p3cRg+l X-Received: by 2002:a62:144b:0:b0:562:38de:9a0e with SMTP id 72-20020a62144b000000b0056238de9a0emr16192773pfu.78.1666305395559; Thu, 20 Oct 2022 15:36:35 -0700 (PDT) Received: from localhost.localdomain ([149.135.10.35]) by smtp.gmail.com with ESMTPSA id r10-20020aa7988a000000b0054cd16c9f6bsm13753841pfl.200.2022.10.20.15.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 15:36:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v5 03/14] target/arm: Add isar predicates for FEAT_HAFDBS Date: Fri, 21 Oct 2022 08:35:37 +1000 Message-Id: <20221020223548.2310496-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221020223548.2310496-1-richard.henderson@linaro.org> References: <20221020223548.2310496-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.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=ham 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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;