From patchwork Thu Jun 9 09:04:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 580240 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp597299max; Thu, 9 Jun 2022 02:22:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRPN89JcCjQyYy2qczhv76qQFqmTODrrDW9VsaME4ydrudeaDARd8Guw9+ya8pS1DFhKcs X-Received: by 2002:a05:622a:553:b0:305:a78:a1ed with SMTP id m19-20020a05622a055300b003050a78a1edmr3233068qtx.138.1654766561965; Thu, 09 Jun 2022 02:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654766561; cv=none; d=google.com; s=arc-20160816; b=n/PZ61MTwX2r3cpyDqjWt1eEfVP4vGDcE0rjqBW1u5bjWv6MziOwU+PkosmvRiBBb3 ZgKVODSZ3RedLnPLszVx56j89YN//B9WYzvtiXKY4m0wFmDQ0BIc6mlyLAGCx5mRuA70 bedZNqNAdk4afkdii2Ge5IuWBOsWSvZsfNDypW4e8mj9Lbp0lMlXSohfERhSKjFW4pXl Mn1HU8aoAx+lbNbGiigkPpzOpXMlN0F682H33hmdPDKiwt/WIf0KfF+sNTuH5CqgZVvl ZSSNmhOyXw4SkvAtYLmp0Crwu+8z/hn7KPocPkXXPsNTPSj0AesE2O2fptuyzUoIjf0Z h4vA== 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=n6D/t27wwLVN4prcAZRU1vm1AJNkQw3wnfuM1H0pUck=; b=DE81vIcwV0lM3FrjPioYhpprr9+wbcGPndYkjy0mUhr6y+QR97KGgPAkZuG/x3JJ4W xtJ9VEkMzdL26m17Qg9idTQQbPy5RkZDGiX9dUUMGmJ209Zv33FoM6FozRsfYdGyZbAf FN1py642jZbNM4Zln/KutO9ObbhPlp+jv1LMWe3N+MLXvDVfNgeGVCb0q3Oxp34Dnw19 vQn+oWUQjpvjqXGav88GJPmF8XK+M/jIm+iyI++80vqMkvmJ4Y60kg7hsJrE09sZFoMs qMOpYjzOEEJP6dvBlRgm4jtOQabKjCbFmsJSHYil7kt5SOhZoiiMnDUxkiDK0+FQjRqV 5SWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="h5Hwx/K2"; 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 bm3-20020a05620a198300b006a671d63e0csi234670qkb.209.2022.06.09.02.22.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Jun 2022 02:22:41 -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="h5Hwx/K2"; 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]:32962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzENF-0008G4-Gq for patch@linaro.org; Thu, 09 Jun 2022 05:22:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzE6t-0001OL-KI for qemu-devel@nongnu.org; Thu, 09 Jun 2022 05:05:48 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:46807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzE6q-0005v7-J9 for qemu-devel@nongnu.org; Thu, 09 Jun 2022 05:05:47 -0400 Received: by mail-wr1-x429.google.com with SMTP id u8so27137454wrm.13 for ; Thu, 09 Jun 2022 02:05:43 -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=n6D/t27wwLVN4prcAZRU1vm1AJNkQw3wnfuM1H0pUck=; b=h5Hwx/K2RSxhAEALBLGhe9sLO7nb48J383r2uyz/pSSfGhvp7FgZZnakzY+n7A7xEp U1x5Z/uuRLLBhDjZ5cbfP3P8Kmu2JlTx66BBe/Uy4R92F0tIK/SMms+15yrBnPe9dcBI PFV6B8lvXrMBjocMsh4KceBi06mCS86XLB8doY43a5Yt6dlyTQadknLB/2uQhHXMTQng O7v2LAwv4IIK3uALE/YpdXQW9JyV5050/PyrNPQgp1U2fCt6fyQcBcE79WSKAEsQw34Y vSyERkpyerYei2/mjJRFYpofejufXwfcSjOntAg9zsATD6shNrkkkTvSzhnoz9Ha7g1q cn7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n6D/t27wwLVN4prcAZRU1vm1AJNkQw3wnfuM1H0pUck=; b=JZh8kCIyPhSXCtVr4Jp36qBn2xIFUH3PPURa7zSbGgjU1tvxrdicZ7VL7nHJMZ+2fN gp/Dm8r3PwhVy/kicXNG/P1Ak085GZ21Hfes3s71L/UNP8TOtmj0nANoTM2aOGy7Lzo2 NxS7VemyL0kf+hTbnprflpz70mOVpOqqX6/Ydr+U90hmmEwEAo3dpeELhEdXSWM5vRIO dxl0ZWxyhB4IsBw6w9w6LdcpJNpKvb8zx6QU//70oAHiqQxYv8kWKyGLL5tJsDRww4lw JiMRvgQbhahJgOuU5XH68eIo+7mZYtIEIuRs25hVECq4POTZrWkQQltBUQ9aDNQLb0Rs rc4A== X-Gm-Message-State: AOAM533L4oTfDsV3BIS3jCkoj5Pi5J9bBycJMahcKJwbqSWmXmsynHFE uwhGz5qC4ZMDXj0Xqw5J9WihMfXI17F02Q== X-Received: by 2002:a5d:4290:0:b0:213:badd:abc5 with SMTP id k16-20020a5d4290000000b00213baddabc5mr32113648wrq.54.1654765541512; Thu, 09 Jun 2022 02:05:41 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id c13-20020adffb0d000000b002183cf9cd69sm11349796wrr.15.2022.06.09.02.05.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 02:05:41 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/55] target/arm: Declare support for FEAT_RASv1p1 Date: Thu, 9 Jun 2022 10:04:43 +0100 Message-Id: <20220609090537.1971756-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220609090537.1971756-1-peter.maydell@linaro.org> References: <20220609090537.1971756-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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, T_SCC_BODY_TEXT_LINE=-0.01 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 architectural feature RASv1p1 introduces the following new features: * new registers ERXPFGCDN_EL1, ERXPFGCTL_EL1 and ERXPFGF_EL1 * new bits in the fine-grained trap registers that control traps for these new registers * new trap bits HCR_EL2.FIEN and SCR_EL3.FIEN that control traps for ERXPFGCDN_EL1, ERXPFGCTL_EL1, ERXPFGP_EL1 * a larger number of the ERXMISC_EL1 registers * the format of ERRSTATUS registers changes The architecture permits that if ERRIDR_EL1.NUM is 0 (as it is for QEMU) then all these new registers may UNDEF, and the HCR_EL2.FIEN and SCR_EL3.FIEN bits may be RES0. We don't have any ERRSTATUS registers (again, because ERRIDR_EL1.NUM is 0). QEMU does not yet implement the fine-grained-trap extension. So there is nothing we need to implement to be compliant with the feature spec. Make the 'max' CPU report the feature in its ID registers, and document it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220531114258.855804-1-peter.maydell@linaro.org --- docs/system/arm/emulation.rst | 1 + target/arm/cpu64.c | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 49cc3e8340e..81467f02ce9 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -52,6 +52,7 @@ the following architecture extensions: - FEAT_PMUv3p1 (PMU Extensions v3.1) - FEAT_PMUv3p4 (PMU Extensions v3.4) - FEAT_RAS (Reliability, availability, and serviceability) +- FEAT_RASv1p1 (RAS Extension v1.1) - FEAT_RDM (Advanced SIMD rounding double multiply accumulate instructions) - FEAT_RNG (Random number generator) - FEAT_S2FWB (Stage 2 forced Write-Back) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 3ff9219ca3b..bd1c62a3428 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -916,6 +916,7 @@ static void aarch64_max_initfn(Object *obj) * we do for EL2 with the virtualization=on property. */ t = FIELD_DP64(t, ID_AA64PFR1, MTE, 3); /* FEAT_MTE3 */ + t = FIELD_DP64(t, ID_AA64PFR1, RAS_FRAC, 1); /* FEAT_RASv1p1 */ t = FIELD_DP64(t, ID_AA64PFR1, CSV2_FRAC, 0); /* FEAT_CSV2_2 */ cpu->isar.id_aa64pfr1 = t;