From patchwork Thu May 5 18:50:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 569981 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:66c4:0:0:0:0 with SMTP id x4csp1096670mal; Thu, 5 May 2022 12:47:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy16uqUXX8ROUCE+xBpripgEfKzdWeKqK9EgQoMju7sNQnig6BJrDJPOXy0lQVQv2w45xtU X-Received: by 2002:a05:622a:1651:b0:2f3:440c:5ffb with SMTP id y17-20020a05622a165100b002f3440c5ffbmr25488437qtj.232.1651780061259; Thu, 05 May 2022 12:47:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651780061; cv=none; d=google.com; s=arc-20160816; b=zBZ7HUod1N+9Htw2qRtZy9khP6qmMnaVvKgT9R4zI7QNlN+wo3Ue3t+uLvYFVCOyzK d4hViFq4NgjdTwZTG4MQExLUvYjxWHhfG+eDGZnoSx03a3jtQvYOY/u/3LwHvrJukj0f Gex6pjyVZztLgKuhovB4YGLzO3G0uXODWdwYxaE2IujlJCQet7why7WRQCOGYkCQg6IN chBIOPha26OXN2BtoZlsOG4LX/wRnCym5yHW4KU6unGaDy+Zl6fmPkGmq2M0uT2Bw2yK J7Xh1i4VgRc7yhhdJPkbpTJzui36X7SqqI0rXgTLuGkT16r97rYl2MxMaHAGgzOFWWpM jsfQ== 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=43XuEEQaBW24fA/OpN/C0G+r/QXfL2oSSQvbYI2NnFc=; b=ZzlEetaIf/nH4lDY0f9oKtP3dEPp2PLmSaCiNlAz2i5LxeiolRMyx2/JNR4SsW/LGl PCL7tGJrnE17JfQaWMk9E8z/Dypjxj71AsJz38qCM4VYdPWQePwQSavsN5obLiuvBvKQ aioEe1Klvse5v/VfXltDfjYkOewLv7U22Bnk3VFOwQjqfgdMzDbLTA6xw7XhVwng9Xhh c2HzWl/KMeBKQwmOI3GV3FUgATwlF73S3ea05S+d4f9KeYrjBID0YA8aPhHYQi6ftUnv u7KXhdirN3IKL6r5dOKSsd9Kayfcnzlp0bVJyZfqe9W53j1oVLL2mDBkh5VyKWA7otsx +YIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JV1nr+9A; 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 c11-20020a05622a024b00b002f3c529bcd0si486616qtx.614.2022.05.05.12.47.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 May 2022 12:47: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=JV1nr+9A; 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]:51328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmhRs-0007cK-SN for patch@linaro.org; Thu, 05 May 2022 15:47:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmgYl-0003Eo-6h for qemu-devel@nongnu.org; Thu, 05 May 2022 14:50:43 -0400 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:42543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmgYi-0004aO-Br for qemu-devel@nongnu.org; Thu, 05 May 2022 14:50:42 -0400 Received: by mail-ot1-x334.google.com with SMTP id s12-20020a0568301e0c00b00605f30530c2so3507084otr.9 for ; Thu, 05 May 2022 11:50:39 -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=43XuEEQaBW24fA/OpN/C0G+r/QXfL2oSSQvbYI2NnFc=; b=JV1nr+9Alv23LjDksJM/oDNw/xp44i5ghLG1RdRQq63bl7PAN1kUiO+j2+MAB4T8KK c1eAl3/GOaBt/z2v92XJ56IGMp48Q7q8tQMp7+Xo1nW5ok2JG6W46m1MYxx7K3W9Y+2z DBRtLmMFuil6Y8sfo/uZZlXKjT0YHni6QYMTP2H0WmWaLG6ORKggsMb1E8P83DLZQg42 27UXecI+IQ2/2Y5X6x/Ft624ARqzZmol0vHShozUpgiH/mKD3Yaq4zn+5r+GIvswkcEt Sc9gucDGUuJlTYdbxRXvf1JMbj3jqiI9ACFTgpS+qtEFSwX80EqohnPLa1s/0kKq2tV5 B7DQ== 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=43XuEEQaBW24fA/OpN/C0G+r/QXfL2oSSQvbYI2NnFc=; b=GtKoFeAUS5qfi0VG4/7K3J9YSr72z5RCEtTvlPCIQFzMwmweh1dxIG+rXkx0tapssq VwsWBGjP4Hdj7rHlfz39ukvbhHclfcl3PCPfyWavgzMmvsDB1KJT3QouuFN5d1FvkVnP +OvZyXf5SjMzxZATSjFnnxRY8D/hgoaNvY1D0th2kfh5a50zhEdeFZ4ZTSgCurqQCyrP PDQMps/IhmW5rUX9pvcLlnfRHQk7bDgAceHqhSFrrQRyEsSAbMiIneMv211XtD1Ubtol FKwLY8+xva13nntG3bcRv14CuOCgXGEPiCYYEKvNSMWGZ/rry22QfCYntvcrPcyh3ddG 3dsg== X-Gm-Message-State: AOAM533Co3vUP0zgalWf/NtV1tw6F45wfY4OdkIiAzfarbud306yIXjk 0KsgDVMByfDSzsOxakiAE+dSSLhyu9C++/Wp X-Received: by 2002:a05:6830:448:b0:606:35a:55f9 with SMTP id d8-20020a056830044800b00606035a55f9mr9742850otc.84.1651776639349; Thu, 05 May 2022 11:50:39 -0700 (PDT) Received: from stoup.. ([2607:fb90:5fe8:83ea:bbf4:c9ef:4f3:11c6]) by smtp.gmail.com with ESMTPSA id s36-20020a0568302aa400b0060603221259sm857273otu.41.2022.05.05.11.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 11:50:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v5 21/24] target/arm: Enable FEAT_CSV3 for -cpu max Date: Thu, 5 May 2022 13:50:03 -0500 Message-Id: <20220505185006.200555-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220505185006.200555-1-richard.henderson@linaro.org> References: <20220505185006.200555-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::334; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x334.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" 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 9765ee3eaf..48522b8e1c 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -16,6 +16,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 07b44a62be..40f77defb5 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 762b961707..ea4eccddc3 100644 --- a/target/arm/cpu_tcg.c +++ b/target/arm/cpu_tcg.c @@ -74,6 +74,7 @@ void aa32_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;