From patchwork Tue Apr 12 00:33:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 559979 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp2978166map; Mon, 11 Apr 2022 18:01:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJyhYELv7l5SzaA8jKqje0RHAIconk4a1QvrhzHFZ5CZcvVcyHwAqkR0yjlZNUHJiaSOcR X-Received: by 2002:a37:27d7:0:b0:69c:210b:1fc0 with SMTP id n206-20020a3727d7000000b0069c210b1fc0mr1479222qkn.229.1649725295510; Mon, 11 Apr 2022 18:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649725295; cv=none; d=google.com; s=arc-20160816; b=EnO0ETwsV/inZoekIoQ/8BzES4wZR89QgGYs2ebMHb9VrvS5mkWYi84Gm+VlJ8dvL+ QA84R9rjdwHPQJ5e2Az8ZhQze+2ZLDFD4AWI2Xsjh2IqkAt6tEY48pggvDlI4Za1aaRZ KGRgOSOsd5Rb2kD3ZMvVAxvk+8guSKTZUvqpkFvZD2v5GjAJBr/nVz0UI1bS6on/SsBN i+pYyS1xg/wveZwCO3p75BVlb5sRRMaU1HeMBsFJvnnPnV5jFEz7iFXlk5RtR0ry8M3J kpNOulIqp2ikdqcAFm+BJ7ShefGyYPKRmLP3nJvijFotwcKiK19jlwu6Evdnp9TRxeLy Jrtw== 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=0Bp2AEYW6PnMq5QzYwmOeueQXF8b6aBC6y++J377950=; b=l82ArjGIsGsya1otJPfUq4/TrlqqODIZrXHJKtEaLg1U/B4HcJTAJ3KjVGf+XVV/Hb mmkqJv0ZXnNcsvKOntiTGBP9Rb94O5qeGqqIVLhN5AVqgKVZEQzxTK0fNYP8dlbIMggP 1Jr4HJ4kVEhfxiMqj038m0xlxpJLmXco3kGdox4CC/dvm5VPoCSd2OjK5JwuMLhL5mGh kg++ILxmdnW/uPHx9hTynYn4J7jH1vgkeno1bc41a42hcLUKD0umwzhnVl1i/J5KAqbm TdQlMtxpNqrVsQHo08Lto22W1Xou5zVxnJbdCbrEZmftiXF5eF5YlCNwlK80hTEzQAzS 5wDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="uYd/ckj2"; 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 q66-20020a378e45000000b0067e4be23990si4741202qkd.469.2022.04.11.18.01.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Apr 2022 18:01:35 -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="uYd/ckj2"; 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]:46550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ne4uV-0001dj-4K for patch@linaro.org; Mon, 11 Apr 2022 21:01:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ne4Ti-0001zZ-LN for qemu-devel@nongnu.org; Mon, 11 Apr 2022 20:33:55 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:42730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ne4Tf-0001tW-SY for qemu-devel@nongnu.org; Mon, 11 Apr 2022 20:33:54 -0400 Received: by mail-pg1-x530.google.com with SMTP id q142so15604012pgq.9 for ; Mon, 11 Apr 2022 17:33:47 -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=0Bp2AEYW6PnMq5QzYwmOeueQXF8b6aBC6y++J377950=; b=uYd/ckj2P59vXk7M5UnUbi9bbrNaAmc+2Z+/zJa5vc9gKdadjBOr5XtGvn3fDpObGj 2HFTUN+4ArnshAt4lYrRrn1gy1Pg8+5W0Hs2bJoOVgsOEDZH1UWbABfjXSdbpJ0S5Hu4 hJR2GbDWXJdTMDAmV5x5wNrhBQzivevpzjEoMZbPAYYbVFmLkkC3GosstbVeftmWvW8G ugSFWMXMwbk6qsF8N+p7hJgiCjnDWYh6V5yb57eXnsuqhB5QYRGfF+j4E42/tsin/2SC cYd9btq7tErbUvKnjXY8L1zT71YGGj3vsplgPnLQCE8UryvaMp7UIp21Ik6gZc/5ojUB x67A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0Bp2AEYW6PnMq5QzYwmOeueQXF8b6aBC6y++J377950=; b=326RMm4lPc+E67C1Bs6jRlNDKdj8+q0/CfmZhIuU0/x+AsUkYpHCO6iqSjLP9e7IDO 7ECsLIpXWhb3OMhH6OiWZAVASDqk/qTSlQEpu93PrGCyDWeEro7DayS1+r5lZ19XHm7s N8V2iK9MmANRbi09APLrppQCPgMlb3R9z0tMWblk+GIoUCUKp0jfQR+XLk8xnTdF0FT2 RjDk8sAQCUwNNwLJ8HDdZMaoqQjYm9eXwusoAma9xUV98SdVPyAOcR3qpGrOptO39W2z vvlBixOVrgWNblo7EtePF2TGMgEXQ90HjaCVAWc4WOap4mFSLv8PkVCeOxnft1FaPMx4 AvKA== X-Gm-Message-State: AOAM531LC2YmyynzxWGznseKSkI3TBWnDTvK31Ci0p5miYaNoV1Xpg4g bELbCYTYYKJTdC2jWXSnX4lQhU0/lzfPmw== X-Received: by 2002:a05:6a00:a26:b0:4fd:f9dd:549c with SMTP id p38-20020a056a000a2600b004fdf9dd549cmr35308176pfh.42.1649723626814; Mon, 11 Apr 2022 17:33:46 -0700 (PDT) Received: from localhost.localdomain (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id g15-20020a056a0023cf00b004e17e11cb17sm38346669pfc.111.2022.04.11.17.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Apr 2022 17:33:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 21/24] target/arm: Enable FEAT_CSV3 for -cpu max Date: Mon, 11 Apr 2022 17:33:23 -0700 Message-Id: <20220412003326.588530-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220412003326.588530-1-richard.henderson@linaro.org> References: <20220412003326.588530-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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=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: , Cc: Peter Maydell , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This extension concerns cache speculation, which TCG does not implement. Thus we can trivially enable this feature. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Update emulation.rst --- docs/system/arm/emulation.rst | 1 + target/arm/cpu64.c | 1 + target/arm/cpu_tcg.c | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index aebe3be1ba..f75f0fc110 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -15,6 +15,7 @@ the following architecture extensions: - FEAT_CSV2_1p1 (Cache speculation variant 2, version 1.1) - FEAT_CSV2_1p2 (Cache speculation variant 2, version 1.2) - FEAT_CSV2_2 (Cache speculation variant 2, version 2) +- FEAT_CSV3 (Cache speculation variant 3) - FEAT_DIT (Data Independent Timing instructions) - FEAT_DPB (DC CVAP instruction) - FEAT_Debugv8p2 (Debug changes for v8.2) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 98fc3ace1f..2b6b9afd76 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -749,6 +749,7 @@ static void aarch64_max_initfn(Object *obj) t = FIELD_DP64(t, ID_AA64PFR0, SEL2, 1); /* FEAT_SEL2 */ t = FIELD_DP64(t, ID_AA64PFR0, DIT, 1); /* FEAT_DIT */ t = FIELD_DP64(t, ID_AA64PFR0, CSV2, 2); /* FEAT_CSV2_2 */ + t = FIELD_DP64(t, ID_AA64PFR0, CSV3, 1); /* FEAT_CSV3 */ cpu->isar.id_aa64pfr0 = t; t = cpu->isar.id_aa64pfr1; diff --git a/target/arm/cpu_tcg.c b/target/arm/cpu_tcg.c index 7775a84575..2592d7008a 100644 --- a/target/arm/cpu_tcg.c +++ b/target/arm/cpu_tcg.c @@ -73,6 +73,7 @@ void arm32_max_features(ARMCPU *cpu) cpu->isar.id_pfr0 = t; t = cpu->isar.id_pfr2; + t = FIELD_DP32(t, ID_PFR2, CSV3, 1); /* FEAT_CSV3 */ t = FIELD_DP32(t, ID_PFR2, SSBS, 1); /* FEAT_SSBS */ cpu->isar.id_pfr2 = t;