From patchwork Sun Jan 28 17:50:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 767241 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp559065wro; Sun, 28 Jan 2024 09:53:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEINjEKBcllZEETAf9uXW2S8pz6oVl4JqKeZ/rY4+hg5u0TiaLruA8YuTR0kgxbl86Aklcs X-Received: by 2002:ae9:e20a:0:b0:783:89f1:9c10 with SMTP id c10-20020ae9e20a000000b0078389f19c10mr4093831qkc.82.1706464413930; Sun, 28 Jan 2024 09:53:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706464413; cv=none; d=google.com; s=arc-20160816; b=HWTjDS45keoXkCweyR0Yo214VFq3tgSHg35ddRnwd/WsRzw10a+qa0oHs+PZOT4Lg9 Zf9PQj6zpRiilvk9Vip7eX+3r9FhpJaXMFMpA/MWC54X7/p/xTsdR18kT7EBRsA425dE tPKfNqCpQXt9yey998ySQis0MqoxiNA+bISVZ6yotIvxse3Ip2668q4JZsmnDWSAonwy lNlRcg0edv8PJqHZ62RUxY3tAA2oRd1QJwX9r2lwmYFsW2bViuj1moh8dS3x5cYN5D/f 5TyRpKvMUO7P0M3TLvBxPqRvFf4/mn7tYChVdyblrs3YdUt3Nv7zJAsaB/rgMpqUFmKA EsuA== 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; bh=poOvik++FXsbb89vccBSsvrZ2nHhvpZ8zCLWhP4YpQw=; fh=xJ1URYKcMN3TM0/XAv5v+aCN+5tIbzAdcfBx5UNgoLw=; b=wwXmLfIScyR+5Uv8j82SRaEjUPYxtWfml/MbnyxBQ9g/7JBmnU67gT0J/5dIDZAT0g BYIiPFY4hj+V7w3PG43W+fwDsIr8zUT5fmF47S7ZPKKTHvXNmHduTaynQ1Cop6Uhn8rF cVzFKC9nv9ZGOvRkhKvpw00lwYj2WMo/rdFUP3ykSD+8O3e1knv73kV/3UBVCh4FnqJf 50TQ22Usmp+fknoIHVoOYo8nPBImrIXUoKa7vjMtGN6ytQfebb47wpfmAzuTHmtDUfqw nHjMBJdihJHymhakRms/X3PRoed2GW10ar4bNm4bUqEDZRALIlJP1yhR8z4oHJvBrU2y At+A== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o13-20020ae9f50d000000b007833f260edesi5883050qkg.487.2024.01.28.09.53.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jan 2024 09:53:33 -0800 (PST) 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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rU9KK-0007VQ-9V; Sun, 28 Jan 2024 12:52:16 -0500 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 1rU9K5-0005d9-SY; Sun, 28 Jan 2024 12:52:01 -0500 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rU9K3-0001BP-SX; Sun, 28 Jan 2024 12:52:01 -0500 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 4D50248114; Sun, 28 Jan 2024 20:51:36 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 012476D530; Sun, 28 Jan 2024 20:50:44 +0300 (MSK) Received: (nullmailer pid 812452 invoked by uid 1000); Sun, 28 Jan 2024 17:50:35 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Peter Maydell , Richard Henderson , Michael Tokarev Subject: [Stable-8.2.1 71/71] target/arm: Fix incorrect aa64_tidcp1 feature check Date: Sun, 28 Jan 2024 20:50:34 +0300 Message-Id: <20240128175035.812352-17-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, 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-bounces+patch=linaro.org@nongnu.org From: Peter Maydell A typo in the implementation of isar_feature_aa64_tidcp1() means we were checking the field in the wrong ID register, so we might have provided the feature on CPUs that don't have it and not provided it on CPUs that should have it. Correct this bug. Cc: qemu-stable@nongnu.org Fixes: 9cd0c0dec97be9 "target/arm: Implement FEAT_TIDCP1" Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2120 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20240123160333.958841-1-peter.maydell@linaro.org (cherry picked from commit ee0a2e3c9d2991a11c13ffadb15e4d0add43c257) Signed-off-by: Michael Tokarev diff --git a/target/arm/cpu-features.h b/target/arm/cpu-features.h index 954d358268..165a497f7b 100644 --- a/target/arm/cpu-features.h +++ b/target/arm/cpu-features.h @@ -771,7 +771,7 @@ static inline bool isar_feature_aa64_hcx(const ARMISARegisters *id) static inline bool isar_feature_aa64_tidcp1(const ARMISARegisters *id) { - return FIELD_EX64(id->id_aa64mmfr2, ID_AA64MMFR1, TIDCP1) != 0; + return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, TIDCP1) != 0; } static inline bool isar_feature_aa64_hafs(const ARMISARegisters *id)