From patchwork Fri Jan 26 14:33:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 766353 Delivered-To: patch@linaro.org Received: by 2002:adf:a314:0:b0:337:62d3:c6d5 with SMTP id c20csp266999wrb; Fri, 26 Jan 2024 06:35:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2Ir72gbAsMha8nCtQuuNpYK54UoQfMYuzHaoRoqxUuqhnevG0Uvf3n6leqniqCmbSsJz2 X-Received: by 2002:ad4:5181:0:b0:686:aa86:9530 with SMTP id b1-20020ad45181000000b00686aa869530mr1514628qvp.41.1706279737651; Fri, 26 Jan 2024 06:35:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706279737; cv=none; d=google.com; s=arc-20160816; b=A5MdXF/2Z0WuGVGIdb4DQuufo7Gt5/h0LBIvgAg20wn9UeB4wGGUHBq6p3VqyQg2RV YrmeNoHucxImrIeltrOXEPTLocY+kQjkJIupVqjgU7FhQgqw6OrveaMIRtMmf2oK8AhO 8IxQ/I0R8Y8Ubr8ml6q7ebi2WwIJjpIikaU8HgkFYoC8qwMisxEUCuLyPtN2nQwqNfdg xbzjOlbEudyREluEZUqOJ+d/gcyBF/pTnLS9eo5MqOUdudsIuJ603P9gKSEZdHw3rshv km4uo/8NrJ7+QBzwMGy83FAUOLxAJgmgLdssyY4ILXmR+9WK+NAhHCZh1cQDMYJiIqkC 9x1w== 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=C5S28rdH5ZOgcnO36OWOW5DPAS8PCmcDgoLOzpGvQH0=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=aF5aRCHmAUEEnWkuFMWbSbvKwBTTxnTd4v8NPUu5dLI++3GNY9v//6Ro9fPypuxbGQ wGlsROEu6pBRMjbrwkMduDJLzWkcNrZV9FRl4V9r30oXQvi98oTsR9FDRWxDNAr2NzY2 MwSLsRwqiNl1FHMeC+SYVJJBds7mzE/Wzlcj/+594H3sNH2EiBECJII/Z43wmVg4pKJc c40buWXobgVbcgE2TqCUetFIp28KK8zcb1AAbrfP8uzRQhigBtOpjM6isWfnIkwwiCZF m+o2pBwwgE3OrUnjTBQ4xQcp8hDfTW5mBaAd0QnTGtADfEOAKdBmKGg7LTgjB9BMaRIK e5ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="VM6/jWRY"; 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 wa19-20020a05620a4d1300b00783dab074a8si631001qkn.582.2024.01.26.06.35.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jan 2024 06:35:37 -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; dkim=pass header.i=@linaro.org header.s=google header.b="VM6/jWRY"; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTNHS-0002lt-9l; Fri, 26 Jan 2024 09:34:06 -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 1rTNHN-0002Tk-Bg for qemu-devel@nongnu.org; Fri, 26 Jan 2024 09:34:01 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTNHL-0007zn-LB for qemu-devel@nongnu.org; Fri, 26 Jan 2024 09:34:01 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3392d417a9fso239941f8f.1 for ; Fri, 26 Jan 2024 06:33:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706279638; x=1706884438; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=C5S28rdH5ZOgcnO36OWOW5DPAS8PCmcDgoLOzpGvQH0=; b=VM6/jWRY2nrlR6dvjufh17JM0zp/0CxemEYfEmKj7M9Pf+AooZD0uQBW0YmIQjUvM/ cPLSYBbAqk6WsPBmnpdiHG2gNI2+/TxW1Sh6iISJvlyZhKN3NQgWd4bZOTrzKs2n3kWS Rt0uN1z++z4hOV8UUhSjhGImHy38M42CpKB/tX0IrLx9kM5PCgf2wiltP0OS/QmBB1Kx WQMiNJY8ZzhChFDlf3JjL3T8VsMAAxWVfoWeNmHUB6dItSCQb5++M+xf4Ekhhzz5tuT2 NZOPRXkGBHRjyDfMm3UQh/aAQg02XL3Yq8BlgToT3BPFdKm84qb61VYGls7ERJWCwhJM bzww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706279638; x=1706884438; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C5S28rdH5ZOgcnO36OWOW5DPAS8PCmcDgoLOzpGvQH0=; b=l1Zfcr+w40aQF0z4Shl73bTL1301rL/qEwu2cTpWoQ/0GOdxvI+hJFSCzDwVgq0vnX 8R0sBbbkzzZ/sdVCIsyUvB/1Uy8t6YuUClPqGbAUhBLaxQEK37WnXffLfr4NKSC8TYA3 w8lwQfztCLZaYpbAA62h9xClm/2RHkR8BVZPS9+7a5oSGzSa1md46utNgFfaa9rn7u9v 0rPdWu5Q54sokkYWXz+QdtfNP7kcou19iTWuua30IQe328J5ymztjMITkhhCRL8ORkBx uX1MFjHx5fUxyDm+uAQhy9EWAd/j00GUgTtU4VlfrBrOlOtFU2t+JlZgqjrq9OxnYa+Y qYjA== X-Gm-Message-State: AOJu0YyY5bEypoX/LbMpeQrA35K3SZr4FiEEzAgQnrzYYwG8Ta1Kf4NL TBxDxjZr0SpLlMhM8Edp0fLsO4IcEwXGfgmqkGqYbLZBJAlMKLheya9d5jrUkQrlZ/aZxlfaUhF g X-Received: by 2002:a5d:4ac4:0:b0:333:a28:bfc5 with SMTP id y4-20020a5d4ac4000000b003330a28bfc5mr1401960wrs.70.1706279638409; Fri, 26 Jan 2024 06:33:58 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n5-20020a5d4845000000b00337f722e5ccsm1396207wrs.65.2024.01.26.06.33.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 06:33:58 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 35/36] target/arm: Fix incorrect aa64_tidcp1 feature check Date: Fri, 26 Jan 2024 14:33:40 +0000 Message-Id: <20240126143341.2101237-36-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240126143341.2101237-1-peter.maydell@linaro.org> References: <20240126143341.2101237-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.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-bounces+patch=linaro.org@nongnu.org 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 --- target/arm/cpu-features.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu-features.h b/target/arm/cpu-features.h index 028795ff23f..7567854db63 100644 --- a/target/arm/cpu-features.h +++ b/target/arm/cpu-features.h @@ -773,7 +773,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)