From patchwork Mon Dec 9 17:43:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 13900117 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F304E154BFC for ; Mon, 9 Dec 2024 17:45:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766330; cv=none; b=Q8Ghc29ksWuV3iFBwP5LofVrYGot6zNR7k3vbLd4PH40vVZdTyQLwkA9ieIYMp1bPPMIGv8bfJBNVwt0k7F/Jwc8jSGaTUfU4gO5z0QhYyPzfZenzGUPVN+Em4UG+3FlkBt4ig5/jgrqONT7U2wR64cwUyOL1JbSgc+BWAGj2Lw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766330; c=relaxed/simple; bh=bAYs8FkdlQE5eqssU46SL6Z8HP476md0o5S9+WxIxJQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jwOL48XplHP9dziMHsUEkcbEgq4AGdcMPeNVtZDs8i/9TuL/EpxbQMDfecPP0jS39pFFGepEV1UHBJgfSEc/JLx5BW/2ppDtOyWytkKQQNne6WbdUCHP7OsIHT4TLp8m0uG2L1srJdtCGpdgMf2wfzEWrCR/V4sPm77ytSJvIHQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=SDMc/zLa; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="SDMc/zLa" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-725ed193c9eso1101479b3a.1 for ; Mon, 09 Dec 2024 09:45:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733766327; x=1734371127; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rEHuQ+kXoeUymHTN8eFGc9cWNeb9aYeLC76//Gda7iY=; b=SDMc/zLavq1qQZ8iEHyXR2eWNO9DNVQUoVF8QGsrCdxYS+Ir00ElAQySwQHtfj3DIv Grzt9anBLDgEa+C3uf2svO9pl4gHDPK18NDoqljklWvtRovTLr4ACAUkvc+PfwOQUB+A dq6H07+vLRsORVLxy+cqDSlAah5c6WyT1T6vk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733766327; x=1734371127; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rEHuQ+kXoeUymHTN8eFGc9cWNeb9aYeLC76//Gda7iY=; b=vZ04J6VD1Hpq7HF9PGZLTb9Ill5tqhz7/FjOz1KPdxpLpAb8dieXXAENlv/vXr/mwC smTwgVXr5QhZdu6b7Cu89pLZIE9CwoceZf1R4x7M+JYhqRcWI1e3k0WOoWsu2Ropi+x9 dmjLiWEvlHsk2VXwKWGaMEgy41yd9btezaXfQ19txkYp7XmFr/Ae02GigzVVZeTOD02C 4qCu2fPbRqySKQOqQPDvNMzet/lvX4MSopLLQfvmS6SSov0lwD2VJ7fLPhX+KEdAHQN/ aF6IsJtDogtRuy/umyd89gBqh7nBsnlFPUdg0HdZDLedgn527tZ0Z+qIEK0tm0vsu+/g vEMw== X-Forwarded-Encrypted: i=1; AJvYcCVKTH7B4sefqsSkgZDtPZDwMFFN6hJTdm1E+kCEDPp/G9RckjU6CmKWX7NRdnYKsv/XT7I0UPfwQDyn5FIM@vger.kernel.org X-Gm-Message-State: AOJu0YyOB0VThEtujjSHGLGBXBCfMvJzK6VdQe0Qaq6bQaERpIO8/Wt3 CV7ZDRiZk+seSNIsPiwkvXtQYtFt9uxaB9pOsj7FQNMIhJD+VH2pNYPIGuPoRA== X-Gm-Gg: ASbGncu20VqXsxddfFaE0h6a/N9EFt+Cjn7CCGkS5BHTN3zjh0ZcZGd8saxAvTSBdxs IMx5trctW51S4LPzLmxnfomN7WBflVcCfSrxDwinLjg2LYL95r1OxPMJ90ORIcKvAovhFmKTHQU 15MrVU8t/7/9EDOEJ2DSGyPsS1s/t5b1D7Yr74o4w0m0YnTLABNvgNMT4n/Y//DcANyseGgJP5L AQWNKhzFZfxyen1epFOgo3gou8B8PYEyuOMrJ3ze93LpewghRf6viw8I6D9XES2SIOxYLLsAQ== X-Google-Smtp-Source: AGHT+IFjr+LTfoeQGGEOWgSsIBHfiAjG9a3g370Vtf8TA8xvJXw9gKEbo9AZcL4ypGc2Hiq/SZ2LKg== X-Received: by 2002:a05:6a21:9999:b0:1e1:a48f:1215 with SMTP id adf61e73a8af0-1e1b1b519b3mr2234419637.35.1733766327345; Mon, 09 Dec 2024 09:45:27 -0800 (PST) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:5dfc:4b08:57c5:2948]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd53ff4900sm1397667a12.50.2024.12.09.09.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 09:45:26 -0800 (PST) From: Douglas Anderson To: Catalin Marinas , Will Deacon , Mark Rutland Cc: Julius Werner , Jeffrey Hugo , Roxana Bradescu , bjorn.andersson@oss.qualcomm.com, linux-arm-kernel@lists.infradead.org, Trilok Soni , linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH 1/6] arm64: errata: Add QCOM_KRYO_4XX_GOLD to the spectre_bhb_k24_list Date: Mon, 9 Dec 2024 09:43:11 -0800 Message-ID: <20241209094310.1.Ie4ef54abe02e7eb0eee50f830575719bf23bda48@changeid> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241209174430.2904353-1-dianders@chromium.org> References: <20241209174430.2904353-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Qualcomm Kryo 400-series Gold cores appear to have a derivative of an ARM Cortex A76 in them. Since A76 needs Spectre mitigation then the Kyro 400-series Gold cores also should need Spectre mitigation. Signed-off-by: Douglas Anderson --- The "k" value here really should come from analysis by Qualcomm, but until we can get that analysis let's choose the same value as A76: 24. Ideally someone from Qualcomm can confirm that this mitigation is needed and confirm / provide the proper "k" value. arch/arm64/kernel/proton-pack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index da53722f95d4..e149efadff20 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -866,6 +866,7 @@ u8 spectre_bhb_loop_affected(int scope) MIDR_ALL_VERSIONS(MIDR_CORTEX_A76), MIDR_ALL_VERSIONS(MIDR_CORTEX_A77), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD), {}, }; static const struct midr_range spectre_bhb_k11_list[] = { From patchwork Mon Dec 9 17:43:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 13900118 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29B031B4234 for ; Mon, 9 Dec 2024 17:45:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766331; cv=none; b=DpmavPbCm/u5XADPqcXryKtr/N3EQBCdhWNXbEdZ+Xd4I6qBqVDGZgmJHvL5CuBh0RuLwZRSA5RHm5BqS++sQU+4VwDcalDvq5guRyurs1OBttcg5fCkO69R/5IUc4WwEZlLuMX79jCKTJ4fk5PNDVwM1p6HnZoArv5bTlmEfDI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766331; c=relaxed/simple; bh=GmNqesxkgBcJIscVO6PMD2XTQoHeWt84/rl2brvJAtU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fYALPK0i+seI/oV1o7QKD02fO/91SH0oPUjh7/cxQy8U2B5Wqtt+E10T0zVmssxe5oqBGLpV31hJlTHEPiI+kngdJ5GTOh5VfmcNTKS/uut/pTpgJudZ3LaX07vAVIlfOyQygXUQyUVs8ux2lG4a4UqfqJI52eHFB6PE3955Ht0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=WKeOy/6q; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="WKeOy/6q" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-725aa5c597cso3432819b3a.1 for ; Mon, 09 Dec 2024 09:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733766329; x=1734371129; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qETIrWIvBOaJo01797E2hvCoFBrPeIJqundEykxnLWc=; b=WKeOy/6q2armRGhaVvnP6PmnrZBWCqITFsA2UWUDL/uvb2iZF+DGIofk6y/UYN2s4v +wc410KNOqdcohqVYkF9zUHrkkE5KGTY1oWRTs3VAdQho5dqhRvsmtZBxwklYCxrcrFU gW6GwXzZTuOlNEWUP4k40ydF2d+MOS1pWk/0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733766329; x=1734371129; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qETIrWIvBOaJo01797E2hvCoFBrPeIJqundEykxnLWc=; b=AKrxvozGPMmveizCSGlvefd/o1cz8EfH8kSybb7m9BnE4X9J3teD584QzhHlAuJMgZ vZByDjnPiwcOBeEmFsFNsDC17RJ9xiux4f3DvL/5WbWhxO5C7CsQ0CxQFvjSm02NER7v QtZlRqsuTFLzH0QoTNVxyLq9+N15Xj3PVGU7j7VqIjkuTB5mD+gZRX5HQt1uhdVIoK+B Xk4k34/FbbntKCeOA43HRvmQSPmvcgDg2WPLifoHN7zvKmkZcyFg5U13aOurUmS7x+r6 2rP4fQqnjRlCaz+2AyJmv9TpGuLRcSfP7SLHCIWieSywJbEmLU+sbq4TFCt0uIwOMjT9 o6Ig== X-Forwarded-Encrypted: i=1; AJvYcCU1tTE92pox6Fk6/mu7NgGi89edevY58i5tAErubeLjIXi5seK2YP6XplW+jbp3ZeRqo9TUvM6JS9aWzik2@vger.kernel.org X-Gm-Message-State: AOJu0YyKVAZsoejQCSK6HZAPl06D724nKL0aYVw055dUcJb70YE6sM0n B2gdt8Hx8Pv9NEYQhG7/av+f6vR9K3h+DzDcAMQ7h1XO3ieo3MOReVooCPzOww== X-Gm-Gg: ASbGncts4MtwnC4BMjSzq1hq96exhO/GmZ2h4K3ciOtk/Az+2/3EHzzEwp8++kAlivz GSiKvAk3vRH9E5otnKRy4+lX7mhCY1BkVTNc5Ba2TQ49TqRNFljgBrqZj/C4cHHza+cOyJarY6r LDcIAiIBJTOYLaZMEAtsw/GRquP9YogQhbHdIK6glsBOc1yammWrKBUFUlqAMRWMUKybsghxAcs 87HyGpTPSeIccFBYh07M6pl5+fCNMRnzSNqmyn15ks8ZoHqtci1zOJA/vjWpwBwC4yqaBwFYg== X-Google-Smtp-Source: AGHT+IEXGhJtpWKLCDTsUasg4AZJ83eo6fiziwMvcakNMUhC1SAx4Xv/ur4wHscvWzwdgagPxhNRYw== X-Received: by 2002:a05:6a20:3d89:b0:1e1:a3cf:c199 with SMTP id adf61e73a8af0-1e1b1b8a4fbmr2336458637.28.1733766329338; Mon, 09 Dec 2024 09:45:29 -0800 (PST) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:5dfc:4b08:57c5:2948]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd53ff4900sm1397667a12.50.2024.12.09.09.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 09:45:28 -0800 (PST) From: Douglas Anderson To: Catalin Marinas , Will Deacon , Mark Rutland Cc: Julius Werner , Jeffrey Hugo , Roxana Bradescu , bjorn.andersson@oss.qualcomm.com, linux-arm-kernel@lists.infradead.org, Trilok Soni , linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH 2/6] arm64: errata: Add QCOM_KRYO_2XX_GOLD to the spectre_bhb_firmware_mitigated_list Date: Mon, 9 Dec 2024 09:43:12 -0800 Message-ID: <20241209094310.2.Ia3dfc0afadbfbee81bb2efb0672262470973dd08@changeid> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241209174430.2904353-1-dianders@chromium.org> References: <20241209174430.2904353-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Qualcomm Kryo 200-series Gold cores appear to have a derivative of an ARM Cortex A73 in them. Since A73 needs Spectre mitigation then the Kyro 200-series Gold cores also should need Spectre mitigation. Signed-off-by: Douglas Anderson --- I don't really have any good way to test this patch but it seems likely it's needed. If nothing else the claim is that that Qualcomm Kyro 280 CPU is vulnerable [1] but I don't see any mitigations in the kernel for it. NOTE: presumably this patch won't actually do much on its own because (I believe) it requires a firmware update to go with it. [1] https://spectreattack.com/spectre.pdf arch/arm64/kernel/proton-pack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index e149efadff20..0437be7c83bc 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -925,6 +925,7 @@ static bool is_spectre_bhb_fw_affected(int scope) static const struct midr_range spectre_bhb_firmware_mitigated_list[] = { MIDR_ALL_VERSIONS(MIDR_CORTEX_A73), MIDR_ALL_VERSIONS(MIDR_CORTEX_A75), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_2XX_GOLD), {}, }; bool cpu_in_list = is_midr_in_range_list(read_cpuid_id(), From patchwork Mon Dec 9 17:43:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 13900119 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3187F1C5CAC for ; Mon, 9 Dec 2024 17:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766333; cv=none; b=hrU70Assy4etUotEgevZN0Sh1PtNQHbSIFNxhyRfYXj/1B4ExW/dXbcfKwf5bqe96YQx94ZgASacbDz6Vcl2ZeQVtylvDiBKaH7FpWI4xXM3v/OJqIa7lDL7S+aoZzk90Cg8ZnpAF3Q1iobSw3CQCeT3xyKqwyFB14c3TnQp3vo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766333; c=relaxed/simple; bh=/DhZ74IafBvOEaRNTiwePNlJ2TNuZ4F4qMfGRFUHrhw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k1dF/qsSTS2BCtLJdAGtxfWNDVjeYhD7TDCcsEqx+qCfvBqdBXXM2C8U9QQcRbXB8YrbMLXvHHazA07j6O4EckoylyCyp7+beHtCbFSQi7GB5HlgHqUP/e8xR3mApU+Yudo/g2E7r4sqGm8L8xmN3KhY+3a1jaHPUPYh1ml9ZoE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=FCvoPW1b; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="FCvoPW1b" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-725dbdf380aso1476923b3a.3 for ; Mon, 09 Dec 2024 09:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733766331; x=1734371131; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GGAjyEPuT0Sy+GKYtRpRtSgrFjpUx/s3n7hQod37S3k=; b=FCvoPW1bomEFPshuNDc2Aq2j/HMteADvyVAlpRa22ikY7+ReHAKY+AV+1tq/fynNgj 57UswU99sOrYbcpKQyyybCjcUalIR4ni32WwDbDQfPkypD4O2bM9yZ4ch/ytx/0oLtMP Bwm+FL+7bC8vBJVwbrLQb2Wt8+yfE44Obzryg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733766331; x=1734371131; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GGAjyEPuT0Sy+GKYtRpRtSgrFjpUx/s3n7hQod37S3k=; b=jJWNHeIb5ZExLTr6guRB2lym9n2NuYa8S/axRQzhPCP4F6CZRqSuUpQNZo3En1wbDq 4eVdsX4bF8ALUyRJlIbtSnfxqgR5seEtR6Bkx3uowX8ai0FUbPPm6hPAu2jtJ6mSMLos i/sWvGlzu+d99CimwaMOF7Hy8LZhYQE9MdVwZsAuTL9qFwOUJ2cKkyXQxO6Y4J33NvP6 Osp1M5VCpmpHO2a2DErWlGZ2x3nEKuuzmTyucd2NH9tHxnOGe6y0W78l8u57DRyg7CZu 9/tE9i30jIir7Nb0vPvz7NRnQvqVnaq5L5pNeqZQpASzCDlJ3252s+RScMjwIQR6WHnT Eueg== X-Forwarded-Encrypted: i=1; AJvYcCWgakibEObvei0pwidbevk+1oT/GJ9QFgz2Rhh+kcLJ/Rp9c3IMl0Nh5qORsdg8cJHPdHdBhv7MNITH/zf3@vger.kernel.org X-Gm-Message-State: AOJu0YwGr8bhwYANEUyOeYXs3vmLkTEh8r4XlTod2yL9sjPJGjzToCe2 PmD1Hwp8o+B01ZO2qMWA/osInzFQRcJw5yVUJsajkNL3TlBlF9MXueCJ7jUQZg== X-Gm-Gg: ASbGncs5PaVDvPP46kOz+SfBbPIhHtnXMpUmtzmZZbrZj9a1MBowyydki8R7DH9Xnxu 8/nHWJHzr0EXu92h1+stIgA8doawYfq/3Pdj4nSrJGypra3riD/Xgb4rJeQ9iA3XNl1cZOpa8RT yDXnOB9eRQ/10BHgiILai5kG/nWW3kOtipvL6DhAQYtWKbGCIWMNmJzZzICUUiaqf4uFdTOnZ/r lKDXIHbGYHeCU3myGVdDhZGGxX2W6pTkT0gGv/nI5ebes/is5mXYR/Zfmoi9sdacQg4oGpDbw== X-Google-Smtp-Source: AGHT+IGIm2OSph5NAKJa8gdDHdlDAkZKg2Ze25JJ3panR0ayICXZnis7gphzZlRUR4Rf5fjAX/kMgw== X-Received: by 2002:a05:6a20:3942:b0:1e1:aa24:2e58 with SMTP id adf61e73a8af0-1e1b1a79c30mr2366050637.7.1733766331535; Mon, 09 Dec 2024 09:45:31 -0800 (PST) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:5dfc:4b08:57c5:2948]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd53ff4900sm1397667a12.50.2024.12.09.09.45.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 09:45:31 -0800 (PST) From: Douglas Anderson To: Catalin Marinas , Will Deacon , Mark Rutland Cc: Julius Werner , Jeffrey Hugo , Roxana Bradescu , bjorn.andersson@oss.qualcomm.com, linux-arm-kernel@lists.infradead.org, Trilok Soni , linux-arm-msm@vger.kernel.org, Douglas Anderson , Anshuman Khandual , Besar Wicaksono , D Scott Phillips , Easwar Hariharan , Oliver Upton , linux-kernel@vger.kernel.org Subject: [PATCH 3/6] arm64: cputype: Add QCOM_CPU_PART_KRYO_3XX_GOLD Date: Mon, 9 Dec 2024 09:43:13 -0800 Message-ID: <20241209094310.3.I18e0288742871393228249a768e5d56ea65d93dc@changeid> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241209174430.2904353-1-dianders@chromium.org> References: <20241209174430.2904353-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add a definition for the Qualcomm Kryo 300-series Gold cores. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov --- I have no idea if this is actually right and no way to test it, but it fits the pattern of the other definitions. Someone from Qualcomm ought to confirm this. arch/arm64/include/asm/cputype.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 488f8e751349..c8058f91a5bd 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -119,6 +119,7 @@ #define QCOM_CPU_PART_KRYO 0x200 #define QCOM_CPU_PART_KRYO_2XX_GOLD 0x800 #define QCOM_CPU_PART_KRYO_2XX_SILVER 0x801 +#define QCOM_CPU_PART_KRYO_3XX_GOLD 0x802 #define QCOM_CPU_PART_KRYO_3XX_SILVER 0x803 #define QCOM_CPU_PART_KRYO_4XX_GOLD 0x804 #define QCOM_CPU_PART_KRYO_4XX_SILVER 0x805 @@ -195,6 +196,7 @@ #define MIDR_QCOM_KRYO MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO) #define MIDR_QCOM_KRYO_2XX_GOLD MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_2XX_GOLD) #define MIDR_QCOM_KRYO_2XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_2XX_SILVER) +#define MIDR_QCOM_KRYO_3XX_GOLD MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_3XX_GOLD) #define MIDR_QCOM_KRYO_3XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_3XX_SILVER) #define MIDR_QCOM_KRYO_4XX_GOLD MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_GOLD) #define MIDR_QCOM_KRYO_4XX_SILVER MIDR_CPU_MODEL(ARM_CPU_IMP_QCOM, QCOM_CPU_PART_KRYO_4XX_SILVER) From patchwork Mon Dec 9 17:43:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 13900120 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89E0F1ACEA8 for ; Mon, 9 Dec 2024 17:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766336; cv=none; b=sGi1mUa6fexi2A4lWd0vRAHDLIJyqXIb+3vHWgoAeh49KDXc9ADX7IxIWWYfDdEpPSXLqGXqJvybiyxp8PL1g4VLl9qkEN0HgHRAlnNNvTOuwPJWwfjFqTkV5+GrWf9NJldPoJnzlpKkbeNSRNERUswFa8E4symFdK9Z1jlRt1g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766336; c=relaxed/simple; bh=51iLuxBMckF9PLpCnsh9tOBy/nP2wx6MKEOSwidGqOU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HA8zQ5o6jcTHzj/NdXJOJq2hniUzAFwNg/YfXwi4CWGgPAHebarxz97QcY5wL9IBmPLpW3BQEjJnTxVloIzu0g+0zGAOCXT+ferYmLm7oqNH+8TDyFlZqFUIn715siTVGMeYePO3lk0n7OjhnCsJgXY2Oj+bsJwNBmAfRBUqLTk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=FAR6xBXo; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="FAR6xBXo" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-725c0dd1fbcso3276967b3a.0 for ; Mon, 09 Dec 2024 09:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733766334; x=1734371134; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ev4g8LO+jsu6za6TCZISAQbXcC0h2bQ18wxFdEcBjYE=; b=FAR6xBXoB6/XlSar1MvySlrHlPW804/ESPl3DavhHzHIgl36qzcm8AZ7nGb3lDa04i ARac94sdRSQp/HtHSlKMJfl+Zu7xvWyQ3/8BbJn2apfMZqKJUU7/eMGqdW2vNPzGcZT1 xFDOzhy0ufJzLT4YhpXaCz0pB9WzfEyDc9gD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733766334; x=1734371134; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ev4g8LO+jsu6za6TCZISAQbXcC0h2bQ18wxFdEcBjYE=; b=VVpH9wORA80Rp81C8PiowAoVg/GirUeJAn7pBdMVl6RVJa1dqsM7JFA1RJ1q/bBFNn 28qvTitfG3o3XJ5tkm3Sinrozkk7JlaNFQG7/NBZcALrt8AJLtWNCMhrCjxa6IhLEoOU 3dgNyh4NElWKBnZKcM31obMt85Dtpz9HDk2ADRevP/9APq6hGsaYNNYlr0vOTr2XlmMA QxnfVHdxiq5GmipKl5fSY83BCFwAsukA/FMayIN7fHLbpWfJJ+7ULHI4K4B8HqL6aXCB hkmsYlFy64qdkZs+3sH3teaY3SOb4wwkuOTUj41cfaq9ZVu52CiKuiuRk6RcTDagrXwY YH4A== X-Forwarded-Encrypted: i=1; AJvYcCW34vU/O5yX4Aj2LMDc4pcOVggLqj7YVNyZy0Syn3SYO5sLwCBVZ7Tni/IanU7H0dcFVfVSP8MJItemLGSY@vger.kernel.org X-Gm-Message-State: AOJu0Yw76vSEtr+2GhFnUr4uOI4MIg+zr11NQ/6QjMUwwpiCPKzWLK0P JI8jCNluvFRFevTQXRP1etwf6ocrTdIpnjF8YVbpf9vgFzoouVt7WePWV5qNLQ== X-Gm-Gg: ASbGnctVbwO/43016ktJlUTpmFH5JfPqleG1xEWzPKIyHScl+XP4g+SZ0nGWUCuHhT9 GMHji2vuQprAly4t3Ak0PvBRiCiuJR17eqg4wTW9u3tSoJFFMX9yTdv39XbAwINxdaBP+7gPSkl FRlps0S2ia89XG/Idk4KaP7THgQK3u3+I4rXODEUES9xPSUw+mxp4o7eYxILJrMnGHfbWelO6Gh woizLZOd4wEuqLb1kb0jlvchmk4PvyjuTDrB6QtQ1p+lxUwo2AuGipPdFJf8LdtFFhfog== X-Google-Smtp-Source: AGHT+IEnZSRvcamRsFqfzU4vT8XoxmVAFMYsZp4K0Vnxwtmo9CBfsTPWh3l3tzKCmptOqc3Lav+yqg== X-Received: by 2002:a05:6a21:3290:b0:1e1:a885:3e21 with SMTP id adf61e73a8af0-1e1a8853f19mr7243347637.7.1733766333900; Mon, 09 Dec 2024 09:45:33 -0800 (PST) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:5dfc:4b08:57c5:2948]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd53ff4900sm1397667a12.50.2024.12.09.09.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 09:45:33 -0800 (PST) From: Douglas Anderson To: Catalin Marinas , Will Deacon , Mark Rutland Cc: Julius Werner , Jeffrey Hugo , Roxana Bradescu , bjorn.andersson@oss.qualcomm.com, linux-arm-kernel@lists.infradead.org, Trilok Soni , linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH 4/6] arm64: errata: Add QCOM_KRYO_3XX_GOLD to the spectre_bhb_firmware_mitigated_list Date: Mon, 9 Dec 2024 09:43:14 -0800 Message-ID: <20241209094310.4.Ic6fdf0e43851269d10596da7e6ceae959431f9fa@changeid> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241209174430.2904353-1-dianders@chromium.org> References: <20241209174430.2904353-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Qualcomm Kryo 300-series Gold cores appear to have a derivative of an ARM Cortex A75 in them. Since A75 needs Spectre mitigation then the Kyro 300-series Gold cores also should need Spectre mitigation. Signed-off-by: Douglas Anderson --- I have no idea if this is actually needed and this patch is purely speculative. Given that A75 needs some sort of Spectre mitigation it seem hard to believe that the Qualcomm Kryo 300-series Gold cores wouldn't need it. NOTE: presumably this patch won't actually do much on its own because (I believe) it requires a firmware update to go with it. arch/arm64/kernel/proton-pack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index 0437be7c83bc..b1881964e304 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -926,6 +926,7 @@ static bool is_spectre_bhb_fw_affected(int scope) MIDR_ALL_VERSIONS(MIDR_CORTEX_A73), MIDR_ALL_VERSIONS(MIDR_CORTEX_A75), MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_2XX_GOLD), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_3XX_GOLD), {}, }; bool cpu_in_list = is_midr_in_range_list(read_cpuid_id(), From patchwork Mon Dec 9 17:43:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 13900121 Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92EF31F0E2E for ; Mon, 9 Dec 2024 17:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766338; cv=none; b=jeArV0qw0ubChKe9nng4DuY8DbhxghoCSWByvy7IdeHHzMM7fkXDuSsOT5kEjb7RkKRlSBFZ24VJFqPRo6fC/h7Ct/EvKsepOcw1WFxQrxsnKaK6dfNdZpHN2luwJE9K5SSX98NS8Zgc2iWw6qZf83RXCe6UXtOhwKpuoSPUff4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766338; c=relaxed/simple; bh=a9W7lPfTL24mvpVVw+B1vw215RW9SqbAYxd81amSaJ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EJqdR+tUB1vqbAdvmAlaZY7jWzZyTE4pzqq+doGmF4D7/y+KWfk6Sqz3uQ+m04bjwFFJ6svIaj+HjQUGZVvkIUD0YAqP5lo4DKPE8Dl5wxc2FayTRcuczq1JSUHQQXGz06g/M5jmUj/crHWtxJdqNUtk8dfrfi+8wdzYCHv0P84= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=JIVATiFX; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="JIVATiFX" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-725f4623df7so912961b3a.2 for ; Mon, 09 Dec 2024 09:45:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733766336; x=1734371136; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ldSIoyp9NzMDNJ5LpZ1ZVmXMctRJ96jT6CjLzy1v53A=; b=JIVATiFXKgEVB6Np4+BzpJv/Kw1+jPTSnDQLMgFGjdb7xZVZRlHEyNdZj4O5Kyc/d8 bFSHydRQ8dUqpsu8Z/tRgJnAQEOC6LvJtNwV/KmyfRgHApF5DSAtUAcUd+ZQOqMxRo9a 3zSH2I9//tkIBm07a5N/aDryNq7RLA9mhGaWY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733766336; x=1734371136; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ldSIoyp9NzMDNJ5LpZ1ZVmXMctRJ96jT6CjLzy1v53A=; b=Ig5cSCyzYXi2MG5RQGRu/2BLDfq0ipDorAKe8dsJ7dgPIIa1JbJMN6rhwAr3pD/JUm HqzsoEncoyW3/60RCcg6U8vTcVh/s9dMCMqs3BkguJctTRiL9GEHKL9bFVz37QARt5OC 8mLGrpw+BXYVeVAC9Ki78UhdFgGfrLp24Ter3Dk9fxJJx5D1zK57B7EKvhyDoCxiJqZJ XftFTwsGdZ9kE11QCeuhvE26aZq4QH6LlQ63rCHV4YqflifB5Sha+gHoU5bFGapmsP9K dO9uk7rMBzZ7kN1Pc9VAn6hU5PaVMqLk63Pko9BLyEarQsGJk97VIBu5bZ3dkyLOp63n rXlw== X-Forwarded-Encrypted: i=1; AJvYcCUggg9okW2YVeFGyWO3UNyeSPTPd2gBzhgJWHbuRMSnctijZ1Ke9xY7JOq+OoUt4KHUea0r3S14lRObuTkQ@vger.kernel.org X-Gm-Message-State: AOJu0YwqJNNpwjmhrxXY9qG4sBKH3aIqMV2XMd21uSA2F7fnjuaas2oF Oz/9QHTe8CoT6OhiBVXZx+HIhcOJ1c5QsYhYuDrBjZwF/fYbANw7CqNVxScZNg== X-Gm-Gg: ASbGncux2gPYZxhUzqRBbg1G+u8YmdP8MmJDjQzTKl95NLF8HJJm5D37qqoMoyEOi5c cwv8DVKQgjvCprd4qH8SXAB63j5ktvQVw6GRilNv7lrZOdjrsxyaYtH3YAvIwMENFhJLcXRKTWC QIXfQjaCC3+YP+LQyT3oFbR1DqVArxBGSn4BsBGwZmczY/Y0LtvpYWNVyhZFMsRbBjAn7LJX+hx IwORC/k7hU57lGPH79QouACcjDXwotNPVc3N4CTnUyiaAjz9AKxr9FXzf/zCVCpKqDrnHhGVA== X-Google-Smtp-Source: AGHT+IELiiIw8x+6pqx5MHw1/w0eLnkGYWzCh4ZJPcD9ZKeamtyRCjQeyjxABNpF1rwAj87E+o4Ygg== X-Received: by 2002:a05:6a21:32a8:b0:1e1:9893:9a1a with SMTP id adf61e73a8af0-1e1b1baeb1fmr2540833637.46.1733766335943; Mon, 09 Dec 2024 09:45:35 -0800 (PST) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:5dfc:4b08:57c5:2948]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd53ff4900sm1397667a12.50.2024.12.09.09.45.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 09:45:35 -0800 (PST) From: Douglas Anderson To: Catalin Marinas , Will Deacon , Mark Rutland Cc: Julius Werner , Jeffrey Hugo , Roxana Bradescu , bjorn.andersson@oss.qualcomm.com, linux-arm-kernel@lists.infradead.org, Trilok Soni , linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH 5/6] arm64: errata: Add QCOM_KRYO_5XX_GOLD to the spectre_bhb_k24_list Date: Mon, 9 Dec 2024 09:43:15 -0800 Message-ID: <20241209094310.5.I41e227ed809ea607114027209b57d02dc0e98384@changeid> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241209174430.2904353-1-dianders@chromium.org> References: <20241209174430.2904353-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Qualcomm Kryo 500-series Gold cores appear to have a derivative of an ARM Cortex A77 in them. Since A77 needs Spectre mitigation then the Kyro 500-series Gold cores also should need Spectre mitigation. Signed-off-by: Douglas Anderson --- Yes. I know. This patch DOESN'T COMPILE because MIDR_QCOM_KRYO_5XX_GOLD is not defined. That value needs to come from Qualcomm or from testing on hardware, which I don't have. Qualcomm needs to chime in to confirm that this Spectre mitigation is correct anyway, though. I'm including this patch so it's obvious that I think these cores also need the mitigation. arch/arm64/kernel/proton-pack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index b1881964e304..212481726f04 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -867,6 +867,7 @@ u8 spectre_bhb_loop_affected(int scope) MIDR_ALL_VERSIONS(MIDR_CORTEX_A77), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1), MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_5XX_GOLD), {}, }; static const struct midr_range spectre_bhb_k11_list[] = { From patchwork Mon Dec 9 17:43:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Anderson X-Patchwork-Id: 13900122 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C7531F0E4A for ; Mon, 9 Dec 2024 17:45:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766340; cv=none; b=CiQpuYaSXWhHOVAAEn40pDoFL6Hocy33IRz2GNk/Z2BRj1nKKib8DK9skXNdN1YuM/Sy0WFjmgSeF96ELUgpM8LvKLrK8/m4uF6DlJIvyPZ6ajZRr9BdYN8RdP2C8iouMkUtYcZ24jcLumqZb/BHzLZSJqi0Y9OxUiQfiPhfFzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766340; c=relaxed/simple; bh=93qaJ3GVaHtB9LawpPgXq1EAwtT4MSNyTdLDOphV9YY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LX8F9jg04NFZRMfFBJsTTodlzdHJpNJx7LZHS60BXcEZFZXxPt7eCoR4Klnla/hA0orrspc9zWQGTqwWEyPmjuN7W2wntmAVB1IjXuiWzG8YMnG8ouEEcZ+f4Z5ZTmTZqrkodgNd28Ih6HEEXLIGsgCjfnyG4UUFCv8/asdkKq0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=UgW0Al7j; arc=none smtp.client-ip=209.85.216.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="UgW0Al7j" Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2ee989553c1so4005264a91.3 for ; Mon, 09 Dec 2024 09:45:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1733766338; x=1734371138; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TPxl3QSUuHKTV79x7MMAWoOiUWB66qwESu+TwnhAWUM=; b=UgW0Al7jzpJSHMgS4O3g56QcneFqPeLA7SPGCRZ8D0Ik/jAF8qGBQTDRcontVhnrqr gSeJPzOwZhhmHRKL71isKrJMYOQqxSGwpZEMAKl7E65J5JSQgm50mAo4gqoVmDYHG8tk Xdy1aJxvm21JuBegVfDgHxJjh5dI0KyFu6azE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733766338; x=1734371138; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TPxl3QSUuHKTV79x7MMAWoOiUWB66qwESu+TwnhAWUM=; b=fHzMB3n8nQozL9yNKejI30HJoWovGJu+jEiPUtp3SbN+mhXA+eC4IDIbrCJ2Yc/f9c v8pigzw/uU/h/e4WzJpSFIsG0FgoeKgrYJoeG5TEgwzEXChl705Mao1QSrKW1abmvcaq tUaTrCOlRk87qTVWBEGMsg0joiJpZDtZxjpz1k/DmB7KaSCgjpply5OPtm1WlmgXmKqJ ZNtysuPoNeHw3p+XwUuWIvVfeDS0lS3UFtMyU4D+WfK2VKHTw0PSLX5PtNsGyTWEMzPL GKxqjuLph07xlbKz+hgxOXQkbhTx/8aXUC7Is9+jePcIY9djuhPIOoibpvU93aYOE8np pELg== X-Forwarded-Encrypted: i=1; AJvYcCXb2VVCiCnrHmKzxGzugGl+qV/UVct9tpu6UhYcuJLo9WtIvhejeto/ZaTCnflsacMBP74948kyoUXRx4fU@vger.kernel.org X-Gm-Message-State: AOJu0YzPuDsceyLr+CVHPD2AUIa9/NzFtfGPvv4MZ0XPaYHR+9LofwW6 hdP6mZqFgTAKEItbXYbUFxBPAoEfZYMGzIEMJH8Y0DsBtBr6cIq4t5FgUGgm3w== X-Gm-Gg: ASbGnctldMRNT2toXGBOqcvPx5Ae3V2ER6HGY3kmsmtDQafvOq/I2/Qx9x5QVSY8h0L 5KsrBebyfqRpfIh/yHSWG5WumnvQQW/58RqVqmrFIwlrw9A9SfRddAGfDg+zXqb4XGSP4YKbzvc 3Vy9KacetLHuasnP/og8z9krVIILbYy1+7jtvU+4eXvKb1dYFX4bxMA2y1kR71s4I0j0G+QSmob qusCb/oQgpnHsLYhuEzFOcJ1n7kaeoSo1UHKD/JOFtD+4N/fOkvoTByVFbrceB7HYN84Q== X-Google-Smtp-Source: AGHT+IEQ1TiQkcWM60OYrpKHzb5BVzSSsklo7u5kyWPZtuHxhJvmJhyRRo76EY6ccYMPTPOgDAZo6Q== X-Received: by 2002:a17:90b:2783:b0:2ee:8430:b847 with SMTP id 98e67ed59e1d1-2efcf137ac6mr2051960a91.6.1733766337960; Mon, 09 Dec 2024 09:45:37 -0800 (PST) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:5dfc:4b08:57c5:2948]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd53ff4900sm1397667a12.50.2024.12.09.09.45.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2024 09:45:37 -0800 (PST) From: Douglas Anderson To: Catalin Marinas , Will Deacon , Mark Rutland Cc: Julius Werner , Jeffrey Hugo , Roxana Bradescu , bjorn.andersson@oss.qualcomm.com, linux-arm-kernel@lists.infradead.org, Trilok Soni , linux-arm-msm@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH 6/6] arm64: errata: Add QCOM_KRYO_6XX_GOLD/PRIME to the spectre_bhb_k32_list Date: Mon, 9 Dec 2024 09:43:16 -0800 Message-ID: <20241209094310.6.I722621804be859e4ae4b7479ce191c5e3367b37c@changeid> X-Mailer: git-send-email 2.47.0.338.g60cca15819-goog In-Reply-To: <20241209174430.2904353-1-dianders@chromium.org> References: <20241209174430.2904353-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Qualcomm Kryo 600-series Gold cores appear to have a derivative of an ARM Cortex A78 / ARM Cortex X1 in them. Since these need Spectre mitigation then the Kyro 600-series Gold/Prime cores also should need Spectre mitigation. Signed-off-by: Douglas Anderson --- Yes. I know. This patch DOESN'T COMPILE because MIDR_QCOM_KRYO_6XX_GOLD and MIDR_QCOM_KRYO_6XX_PRIME are not defined. Those value needs to come from Qualcomm or from testing on hardware, which I don't have. Qualcomm needs to chime in to confirm that this Spectre mitigation is correct anyway, though. I'm including this patch so it's obvious that I think these cores also need the mitigation. arch/arm64/kernel/proton-pack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c index 212481726f04..67aa54017dea 100644 --- a/arch/arm64/kernel/proton-pack.c +++ b/arch/arm64/kernel/proton-pack.c @@ -860,6 +860,8 @@ u8 spectre_bhb_loop_affected(int scope) MIDR_ALL_VERSIONS(MIDR_CORTEX_X2), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2), MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_6XX_GOLD), + MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_6XX_PRIME), {}, }; static const struct midr_range spectre_bhb_k24_list[] = {