From patchwork Sun May 1 05:50:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 568576 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp7717938map; Sun, 1 May 2022 00:10:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnwB2zpzcFf6VbqqARj1JlQ1ZuQ3DZw4iVvzXd0VaXssbdqgD4Hw/uYSv1Jz2HFzxM9/bi X-Received: by 2002:a05:622a:15cf:b0:2f3:9f37:b293 with SMTP id d15-20020a05622a15cf00b002f39f37b293mr3602942qty.251.1651389031562; Sun, 01 May 2022 00:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651389031; cv=none; d=google.com; s=arc-20160816; b=gjyka5ynOPusAD61GhWyFjjvjlsL9G2GMiNT+hlUHUFIFg5fpafZ18872KBBsp/pSK 9KqcL577DPAwbJt0fumS+xX0zDrtZ0pEGJUxLq6XGU3Uta91MbJce7NLTzItbB3B3wIU izvqDTOzWMCNBmBS7WSEEIhHmIrunWF2TpI/uqP7MqnFwh9IGc+dtm8Re/vadqJi5Ff4 OgERAXAmOFTYKMlgeD/b6c1JNtgHh1OzwxbkbpGdvawOnmGLYJjNnjmcuJL1YhfdXPPk IZ62D53068V07ykEQLxdcVPgyqOTfgmpWlWZjA6VVSCKE6Fw1kHFGUqji5SZ7RIxlgaw triQ== 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=YgPJJBWxd6UwNbu8I9UhpjXUvb+eh/ewRL4C5SYoXZc=; b=dSjS32VrsVKmXrk1svX+u4Y2KG7NoNxRIJo226GSjsLaPho7Bxti3WGCfoqe0V/q/g Aqu0cC+RIssSVVN9n6EzdaYnvuXB7Yi5vyS+56QRQua5t/wK7kiGfwMddJX2/oALmEYf Y81fwCsdKT0frFx0C0rtoR77/+nrughfCaJPzsn2LtSM6nFWFzilUOfGMH5jnanOFNcy Yp2oZBBtm5xaQq+0CELX0oXhXX/kch3GBGtNRlb+2ELxqZEc2DFAFYzvamhjhF+35mmx wDxNyPtoYeEM1Pe7tRE/uo3yCqBY6LUSMgV95x+dd++sTGNFyOcDrN+US5snwJiDYflH sdXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ljUxeRGa; 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 y1-20020a05620a44c100b0069fd2888a61si540167qkp.581.2022.05.01.00.10.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 May 2022 00:10:31 -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=ljUxeRGa; 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]:54562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nl3ix-0007cu-5N for patch@linaro.org; Sun, 01 May 2022 03:10:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nl2X5-0001AQ-V5 for qemu-devel@nongnu.org; Sun, 01 May 2022 01:54:12 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:38594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nl2X3-0001lY-Pn for qemu-devel@nongnu.org; Sun, 01 May 2022 01:54:11 -0400 Received: by mail-pl1-x633.google.com with SMTP id n18so10285324plg.5 for ; Sat, 30 Apr 2022 22:54:09 -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=YgPJJBWxd6UwNbu8I9UhpjXUvb+eh/ewRL4C5SYoXZc=; b=ljUxeRGa0jwvJTYyNAzohNeJNnLr1DQxCjttj/QKBYNjVUQnWWSZaRvLgKJdB9R2To 0LwzWV0iSsS6nXujHOrRXUSgM6FjbjTfeXIQDW0SBt3Drymx8aOQPrhtXtNVT+Nzh1pH OKpgFzQGVJbbyO6mMnKaAcpO7ZUnFA2z2DakqgXM8U9qQQjYgY+SKPaoLMD/GdUky9iK lhir4+PO8gtLuTB21oW6m7RcefTz/eUeF6b806x6OZ28K/gx/ZSujZExs/gjBgye3uDy U4+K6+Ef+9ef97Uu+izG6WQQ47lcIpsrkaUKgL7e5R+E4BsnUSBny6hWqlUVHAc+CWLZ DLZg== 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=YgPJJBWxd6UwNbu8I9UhpjXUvb+eh/ewRL4C5SYoXZc=; b=qalagUWsB/c9gPmLte+GidoyW7AvoTKNaIoxT0MLWzcBQU3QM0AmFf6WG0/JZJSBt3 9nL/6iorFvN/jyMX5Z75iQJaLJqhqhmIf6jHzps1vCrF4BcNpo+WtefavyJCGasEQarf MndTKXxyZ8LEK3rUdVzO3N1EKLSmzYy5pJDSrx19LiQTp1L49FyAX4ttHo4QcYG49Q01 Q1Y4h3WjWxlwC5lGlY+bk4k2tyqEshhd5DL2sIL9Q28w5wKeIGoAmWG9PGJIAo4yNgZl 51UUhd9vGC6SDMzmprUgTW61f/WFX5C/uOgzU32hz57s1cVovJEnS3mFFqpKSxTt9Yn5 /lgQ== X-Gm-Message-State: AOAM532jp3XO40AF83fj8RsYw1QNa00RIJIQVk2FNjUbgrmJrysznT6M +ZedrxIKLBfW6SrvaByh2J/lozOtMdEbVA== X-Received: by 2002:a17:90b:124a:b0:1d9:de12:520f with SMTP id gx10-20020a17090b124a00b001d9de12520fmr7139816pjb.28.1651384448637; Sat, 30 Apr 2022 22:54:08 -0700 (PDT) Received: from stoup.. ([71.212.142.129]) by smtp.gmail.com with ESMTPSA id u63-20020a626042000000b005082a7fd144sm2341507pfb.3.2022.04.30.22.54.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 22:54:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v4 40/45] target/arm: Enable FEAT_CSV2 for -cpu max Date: Sat, 30 Apr 2022 22:50:22 -0700 Message-Id: <20220501055028.646596-41-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220501055028.646596-1-richard.henderson@linaro.org> References: <20220501055028.646596-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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: , Cc: Peter Maydell , qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This extension concerns branch 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 b200012d89..b2a3e2a437 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -12,6 +12,7 @@ the following architecture extensions: - FEAT_BBM at level 2 (Translation table break-before-make levels) - FEAT_BF16 (AArch64 BFloat16 instructions) - FEAT_BTI (Branch Target Identification) +- FEAT_CSV2 (Cache speculation variant 2) - 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 10410619f9..25fe74f928 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -748,6 +748,7 @@ static void aarch64_max_initfn(Object *obj) t = FIELD_DP64(t, ID_AA64PFR0, SVE, 1); 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, 1); /* FEAT_CSV2 */ 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 c5cf7efe95..762b961707 100644 --- a/target/arm/cpu_tcg.c +++ b/target/arm/cpu_tcg.c @@ -68,6 +68,7 @@ void aa32_max_features(ARMCPU *cpu) cpu->isar.id_mmfr4 = t; t = cpu->isar.id_pfr0; + t = FIELD_DP32(t, ID_PFR0, CSV2, 2); /* FEAT_CVS2 */ t = FIELD_DP32(t, ID_PFR0, DIT, 1); /* FEAT_DIT */ t = FIELD_DP32(t, ID_PFR0, RAS, 1); /* FEAT_RAS */ cpu->isar.id_pfr0 = t;