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: 13900125 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ECE8DE7717D for ; Mon, 9 Dec 2024 17:47:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rEHuQ+kXoeUymHTN8eFGc9cWNeb9aYeLC76//Gda7iY=; b=3w8E3020Jbsw2gEAFA00zXuU10 rI3X3m0+syuwOahnNyNw/bNV5olO16IwyM8Fy45usvhN0LKYRDOLVCl9BoMaccIRRUF+kqVEN844z 8lj5UKB1vT7E3xUOB1CvDkQqE46D/n7+t4Xlp/5IrIgl1RDTxPsglU3jrKjUPA69jOPqzRgbP4CYl 0GZLyZEDZs8R/xkpujW6XzzLWk7T/oq1oEfPwswcsTIdOvnDZjlOihpdxJFN8pHldxPicVtlQr4XP 3VYFb4SKqOavqgCVc16v15PkXNOSCktFfzN+JxQ8yfvrq/BU8tTnFy+j53O64IiqlOkiLgbVF6e5Z Ju3mWx5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tKhr8-00000008mfu-2hnm; Mon, 09 Dec 2024 17:47:38 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tKhp1-00000008m3h-3oSQ for linux-arm-kernel@lists.infradead.org; Mon, 09 Dec 2024 17:45:28 +0000 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-725ed193c9eso1101477b3a.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=lists.infradead.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=esUkF+sDZJ7vTxlM1+BNOPdEfOzMi0nVuDZpHdrvVHyWBtGSW9l9cCQLH0Z4Za1yew 6kUZpykMJAVSt9rUiIvdPhJO02SORmovMDJQDdw71fY/sXwBAwXjPiADMxkD9036gql1 azJ3Oj+pLQ1NmW7XBHK0vRS2fy0amkBL2I7vU= 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=YaIktBf1g4Jvpeohd+UX99frwKLOpb5B2YENDkyj5cZHLk0lJY5wRX7//4vr0BINUW l35btHmqjs/45ehZa/euKqZw0hHj7HQ4eAF77dycdwm0NtuSXp5Go3F55ezdfNTWFj1Y AUW3pm+WG0+gfwhahUtLGo+y7rGdgF1XeSnNdXeMyeVDbVuQEGJImCAYqnvSXAkH9hte tJbZs3Iv9OGdYaZQxClctQNKVH2mBU1WoiCU5yF0EpIHjg7L3RZMCefT8iCsM98xShQl 2/C8iiTzUehYuKNetwmTSR3tsQwgznmE+rYwDh14xXpMse9eaH9xyI7qO1pwaCqLVv9n ibxw== X-Forwarded-Encrypted: i=1; AJvYcCWNtEb8S/R7/LwNDMmDZ2xlJfRFGu8c3Ao508cEO1gvaeAI8A4a3bpO71PHHRgIisRrvO0wefnN8nzXOU38nwzi@lists.infradead.org X-Gm-Message-State: AOJu0Yw/FzMXc7oj4kCJ1/8EzfT3g/tK+VLYOFAu4M5jtoiY9XVzCPL1 Z0uNHli6MeGEIZhxQ7+t5EFzgvoV11kx/mPPdYIY3zFewFqHKKhf4hbnYpJ28w== X-Gm-Gg: ASbGnctAY8JRHJJWyRiH1+jPvDXOlJmgsyjsT6bhijCnZJ+pZf5YKgyKJA6TpNX6TbY PiPvtCeN2hI5Nuueuo7Te9LcGGY4ixhbjVcED87ZXn8fA2fYcdzT5fu3gP4C4dsndRndGCEE+bV VDBumDSh5S180F0L/lRbP9uxn4rbxMeGI3hlUTgD3jW9hoEpvkzenxVvl6UppsXy34p4Q7Iu3lD jg4qD1ros0enB+1zzYJ4/b7gXiWqfajddFDskPwsXHI4h/p/Qstqm8CrByCMEQYFY4Cj3rGZg== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241209_094527_945894_14AE5B0A X-CRM114-Status: GOOD ( 10.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13900126 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 909B0E77181 for ; Mon, 9 Dec 2024 17:48:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qETIrWIvBOaJo01797E2hvCoFBrPeIJqundEykxnLWc=; b=DP0ErmGOSDGTYdBE6OEcZVlaXW FhCyoUgxLPULIbX4vsFbsXkuSoP69XCuMr4MtHfv8XlPCzVp2AeTeCvJifEkwm2B5+mU8h63aWs96 B+rE2p0fYmJ9sHxGGLQqjKNiHWRgBHraIgjCoOGyf9qQB5uKWf9c9h5bOcnhSMVAtqs/pBu+ZXhkf SSv/BLwQj5Uvc/UbdtM+zlSJENjYZdusLKfdKix0/G5xQd5bt2ZX8TzwuCbceCKoYihkENeY9XAp2 KzroO/MtTrleBbB0F3hlFHUHdeoXiebiWM0Fg67UOBx1RuhtoaaZ8JkUWio2jpvW5Hd3CmiCmfKIS 9d5otmlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tKhs9-00000008mtk-1PGT; Mon, 09 Dec 2024 17:48:41 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tKhp4-00000008m4i-29mA for linux-arm-kernel@lists.infradead.org; Mon, 09 Dec 2024 17:45:32 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-725aa5c597cso3432820b3a.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=lists.infradead.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=SD+SKQSVrv/1UQIqj4lTP52hxGaj3vw4KSEcUQzwKqZZnSJ7mMB++t6KWIPX9vI1Cj QUdIP0mXk/JK/EVPGX2rnVJ7dQFVKZA8hTAs/E93IjJcQnwKApdaUFr4xhXB1DL7uk/w PVXA3x02vv5zebPoU/P1TLkAEaHbeVp/Hy9d4= 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=blx+EnFCBKT9gpSciQhYWi/8N32bxQmqS9rMJclHpDpFqIfy5YRKuTsRKJtIw8iq2K syh1/d7e2Br0Z1Uc/hHKJtbfL2u8YoEDcXCRiy8PqrU9OiTqRMMk6SD+jFZBIAs19YBE DyZlxpNUKrRmkocFpbWgutcNH7r0EwDXC66tE6xitM52q9nr61Jm6H00tn8D8CzCRdn6 1C4pLLxa/YApiUMu8I5CDuuOD3D9pN6lEiCjRSrbst4XQhZbQgYdjjb7Xi5g9eT9VxWI Hc7ayZQC5Vj8gxr6nE6zz7/7Jlet9QMofgiL4gS6yK0y6YJql4cvRn2oWAClW53gWf7/ IAeA== X-Forwarded-Encrypted: i=1; AJvYcCXyT8CTgZJg0KN7kNHRXeMWQh7LTkfiW6PHQCYAIRRgkxIs6FkaHnC1LMf5TG0C7UMMYXA3zKMxKbcPc30wXGxF@lists.infradead.org X-Gm-Message-State: AOJu0Yy6I3QyvWmoPXwg2rqu+gaFJNMndAeazwRq2EPvHOPXLiEQIHb7 J5QhBENdJat1N2FjoQo4CCLl43by1SlqwlvWfOfIdHrMmJMwe1DDmhqXIA4KTQ== X-Gm-Gg: ASbGncvq8xNG9bVByX3RJv4WjAaP37xz+Vcg0SjqzR85abx8UCw6sQ/f4DxrMTL1GZo Qm6kEgaujgvJ53w+SAqwBnw/j/n5kArDVkxZjLsVVUb02V6Dl8YtYkHj4bhEV+bERgc2P/XTlLW KdQETN46+yWLQA4IN4vt0qW/xfW6DH6W6DxoGgUhz/yHpVQF7yUNtADEwT7Hnl8UXyH3N4ljGf2 Y69wUd5mx5vDWT2d1KzthfkNIzHOIhJqWvooEKroFYlDKuZ41pemLtIZ6bZP9rkKSTZgXTkKQ== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241209_094530_557181_8ACD0911 X-CRM114-Status: GOOD ( 12.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13900156 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DEF2FE7717D for ; Mon, 9 Dec 2024 17:49:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GGAjyEPuT0Sy+GKYtRpRtSgrFjpUx/s3n7hQod37S3k=; b=Cd97rZl8gL/bVHsJDSog1wQFdV ESpEZsUkplu8I//VL5ZJ9poJ6rPuDhcLfR+gV5FLXIjgJ0UWu6DWk0PNfhXaH6I/8TW99XfTwP0Dy wJGiy5sAwKl/A+/pjAC87Yv7vizIf4L5gxvHgfcl2UdJfDeMOm8v/E7o1qNE25I+mo/X2aQMxYtWZ 19m4zX+Lxxa9MgJkw1LIJhZzvq2IGSgl0dmeDXOrXaraQhQYgKtjGiFJfFAkI98wIBvvIh6aDRWkv npdCiLVC3AcI05e3vSxPhHjpr0G+JkhA1uM7U3wEZLLQXQQmGBJxgN2N+pHhkkhg4KITPFww7AIkq Qv+BC4nQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tKhtA-00000008nGX-4AFT; Mon, 09 Dec 2024 17:49:44 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tKhp6-00000008m5x-2bWU for linux-arm-kernel@lists.infradead.org; Mon, 09 Dec 2024 17:45:33 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-7258cf2975fso4016204b3a.0 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=lists.infradead.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=IgXQkh0QhdwrqxodFlwxunpjJmzJNe4pgVtgCiP70HnkK51xQeu3rBi9jwAgDbgkDu znWNg/JC5XYBtD+7LFJ6Qm9LvyQrf2hWxC7PSIwujPAOyqE/3OOC4koDDpYR1ltSss0b UMsog4F1Zb113aOJVBw2fVaVytrxskkNykhb8= 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=k8hwoAKNI8MUEkqkXMcqQcQ9l3hPDyNjVtUog7nAQXOV9kfZA4nafduRn3xfij5msk XJJrzH5m6MIm9cq7JzpcHG1PKgZ203uwQhmHQkdisorVjKTqIWOHPp4hsC9fQ5v45Ql7 Q4LFUGef8FIRVDgjrGO9tjmCIYjnUy8HgSIb2lWpWaMVcAsuxjtatbTBZG8lrhZZ542c TE59iifKbba0qvDID93rw1EOhBbQQdXRMe4w1iUHs7NYMgjlkGgzbuDs9SeszltNsdg+ 5W94hrVy2wfoLBxcV14/ega9L7HQtBkL+g+Aql/WUya2AQUkqj7VraHzai0ACig4ClYM chzQ== X-Forwarded-Encrypted: i=1; AJvYcCX+VS/tE8+A/tp+mFpbjaDC7Mi06DOfhd/x8hF7H23u/eI/0WI058+0w9HiuecSiwn36KNznHZLURQFpcPOhmVb@lists.infradead.org X-Gm-Message-State: AOJu0YxZtBqEHF4NHEocEElPSWrRGDkkk1GH714KoNVS1GamgqWn99Ph z6++ZmLM9MVxHQ5HuPPZvVmhG5Wf9xKZsLmAWkYRAc+KD6e+HLF3CcIwXVCJ2Q== X-Gm-Gg: ASbGncsXPpGdyu/spRn+M6sh/9IGHWRcpDVdokVHe9cjGfqDhM5Nas4eoXG5z/ekD+X DZVPnaAzWUQGpQvmo+z8ZobTsyBeft3z/pBCun4q6uESds4f9ZyL0juLaMqf1pvkC9Qb6g6kQYu /FfArBzJzm+8QK3xSVY9bOXYVPo6Kd3Y9EyHwtPuO6kTX9/l+Tjkhpo/SCwcaS3c8LbXW5Fz6RZ acFtZoa5fcEbUb9duAjf48DHGgCm1CETX6zk1O9cIjh8RVlEvHI8+GEE4NVj/wmh9Y4dy/Wqg== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241209_094532_657422_8FD23047 X-CRM114-Status: GOOD ( 11.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13900157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB418E7717D for ; Mon, 9 Dec 2024 17:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ev4g8LO+jsu6za6TCZISAQbXcC0h2bQ18wxFdEcBjYE=; b=TEGdfBQF3/3JhpP4CTKx7e4WrQ Wn5fAwKgbg40++tAYulQvAw+4U3TISivUF5B0NrMSoaxW/H5vAZIx6cGFfZxquzNpFU2NKsIwLO36 apdwkkBWswW+fkIUyz3S/9tySpmO4kt8/5I0stR6Fn02bPdyAEF4rn/B45w+EhO2BNK7NWob6Snol RV9xalJQpneBvwskGJCAsqBqIIp7LsO/PxoIsFOasBM5fvyN7CPCD24WwtJS5gu2J8dP/u5ukr5R0 uz3p11je+CLp/Y69v6bahjBXQwVGXDuEWESxOj+S8Wg5VoZhDxq/stZe70sVSN9ovV3qO9XsrW9lO Tx25CSyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tKhuB-00000008nYZ-2X75; Mon, 09 Dec 2024 17:50:47 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tKhp8-00000008m7j-1mPT for linux-arm-kernel@lists.infradead.org; Mon, 09 Dec 2024 17:45:35 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-725ee27e905so1346731b3a.2 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=lists.infradead.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=kQ8kIBTXJoyeRC+JBZBG6SJ23AV4120hmMPbBoNIIGz1P9tiOcNeWtESI52wS1R+6g c+XpA7eHM+qjR+ZLtc7eybR+4WoAqMJAItxkRwQ1IRrKCCS7XQpJZr/gF8mkDamrwRRB vIWdhWvU5Km4r0xk+PHEMJj0SBKS431hYNihY= 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=imFpzGN0lKzOhSKeu41JiE+savtzylh0xkCno7pzBoiggH+ZEclQMqj/SqPZy1LrRz lDh+xYl4iUyxC5FbGUkK2bMU3Uz39fltfs0+2LaxE0F1EwFS8sRQzRTsOAhmR4ZOMp7m mKMLbLXFA+UkJxOJLHOgVEiIyDyquwH47XTM50iBF5RJNx+296feaD5+zBqw8Te28GIv Ap50tpy7meAfwUGxonixw8YG7a1BU66RpC1z7wEeLscFqr/4cQqxwrhdKv7CREdoUvLF yGoWqGEN94CT/WkKFWQrJPVVBaSncwF8Kl6eEdQ3tp3MKvBvBzYnr7gdYxVb6MLWBm92 4lgA== X-Forwarded-Encrypted: i=1; AJvYcCUqLTKDJLxxtO4imggEcoS8kbvk1J5obkeUzJ8fEXzRZhUja3AwG2+7J9FgblbeLQtW+deUi1OWewsm8rmDQwIE@lists.infradead.org X-Gm-Message-State: AOJu0Yw8NOFQMCm7eqbTNGbMyMoBtF3vAXNkcFWkTu389KuVXpmnFvYS 5Q6/sFHSG9VGppjs7GfiRnSXhbk6PwJXZ6bFyoVLKT9ULfDg8Z9/T35CzAO0vA== X-Gm-Gg: ASbGncu2+tazFnDmGokUEaonUPNlHd0xSWU7oDUDxAu4B0ZHS10YP3Qsy4/E1YLA9DK qfYft1+1l5zjw8qd4JiAeCIFLCPIgg4W/Ya3SycidbnT49GDOvQhPVrIQFA0Y7ggL9jwlAGEn2p 5uGJmJnugbsKfFzvR62Z2eUK/Mzx9cWW1v48iuGpu5Utcw/dogddJ5HMq3JwRKpa74CuMDnkByN gtWyPd9wqLkvjotKIDh1Y0OlQ/EThGtZEQV2XNcPJXfKBX2x2dWvFtbY6BWgBf8+6UEgg== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241209_094534_458113_68264BA1 X-CRM114-Status: GOOD ( 12.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13900158 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53E20E7717D for ; Mon, 9 Dec 2024 17:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ldSIoyp9NzMDNJ5LpZ1ZVmXMctRJ96jT6CjLzy1v53A=; b=oVxZxXPdRqQSgus4Pn5BZJRb9H g1AUvcaovP2yWFlCOaMiPgmTTwQ/T/R4MYUz33QBOgj4sVGcfb2nKKfbm8taul8LAXjQvz4oJ7lWm +Ulns2HaBo4LfTsZsqtBM0Ge60rP5fLyKxjhJPP42Riiw1dZnGHSWgeos489m8m91IFmurAEGL7Jf nSJV+zNDPcp6/2CxKUhPggGHY/SYsqtZxcmgWq153gRdLD45DaRInGlvRD/pIdWhSXHoIOUugkFx0 IUgth+F58KfKYufQ516l2bhfE9I9DXYs+pUHQYY2A87m8EC1hsBkGUoEcy3kesXDReoaqM1QAur71 S8oZ7bTQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tKhvC-00000008nj1-0ufv; Mon, 09 Dec 2024 17:51:50 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tKhpB-00000008m8d-0TZe for linux-arm-kernel@lists.infradead.org; Mon, 09 Dec 2024 17:45:38 +0000 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-723f37dd76cso4189614b3a.0 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=lists.infradead.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=Q2hU/odTZS8OX95CNVOMSWXkpACcAlv6Jnkkx+8ggei1jlvHPWPsji72Qo6jk886U1 GQjzdE1rwI5OKm0aOlJ555gAp6oIK9mA8hqM0bHebdiQvnGQGz8vuFnctIdT/xO5Ki6y DE38M3VPfgE3OEnJI/CmPfkLTc5SM0N0ITJBA= 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=SVNQu2fXzLyZvsNN7X08fMkkzrnjMIe0bVNpQ10ZzfoyqLe7eXJ3VPdHj4k6Dt1QeT b9349IUgWuGMqaN0fAcPqeyt/O9XxFGA9MctFyx78cLSRk0jHe0AtNnD+g6Kg3GlJg1U Up8hX5YHGTuOd9xTU2QHzrK17xc1NVH0ORnxsGA7z9ESIuyKIvFYO2UO2SPyd0e1/d/0 70tmXjdkhjG2xHVJFG+1ZumbxSh1aKkzwLgkRnz9ORxbFdiR5RnildWZUGM++3M482Su xhjj0QXwWGFbtGm8tkDDB81rvVkQtMX7ZMdTCfvg+0WZ8to0hilzWf/ReGlg/uNajYEk Z0Ew== X-Forwarded-Encrypted: i=1; AJvYcCUFtLgE7uWq5Dhhz+Ok/kmbcKMQ6GcPUO2/xGgJA/t2TRXa87VfcHLhABzMFMTiVtMEi8Jf8YyUvdu7IKolkkuk@lists.infradead.org X-Gm-Message-State: AOJu0YxiabiBLS8FeVGJzAsMGJSlYFw6/1pvjbWHdFTHXt6p8hjUd5xT G8YxvM/bLQMfNx8/eCGR8UnpqI7Ue30rXYVSOxOddcq6/cXM1VJlPqCE49lRWA== X-Gm-Gg: ASbGncuqNjciArSbjQtvWJllkXjZZ/nqpImne7cNbeE1lXGyTlhGQGHHa3MDOt/ynw+ 58JgtUpn5P01jTmmnLgc5iGgsZ4MgKg0kHjGYvVy4wuB9PDFQpqIUiG2h58Ek3lHNmLEX6k2JSG 1Q4JgzZ+ClPth0dhJv/VbuceObFje+nX5YjXRw1GgKA+AJ7zNhVeRZspdAGxcpKQjGTaK1tY0UX I3Tw5mvKsVUy0lo4Gn1CI28F1XOgfcsh0h6NraOCVqk8IUdH08VFR9lA2w4Hx4HtRnmggkseQ== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241209_094537_151035_92B4A410 X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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: 13900159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B41BE77180 for ; Mon, 9 Dec 2024 17:53:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TPxl3QSUuHKTV79x7MMAWoOiUWB66qwESu+TwnhAWUM=; b=4vfT7KHCMJ23T9jm7t2tmMPc/l LjWpZ6RkEPCnUYYAfA2XpOrxxhXXqWcqy3yM9KX2t1D8Giqz1byNIHRHdfupk+Ri31tfQDJfOmKko jK3ndqhmwRHEPSe0uXtqvAiQWWj4bINYd8e5MMPRK7RYZeo9bKuyX8sDmGWZPTjJf0pOrYlzh/1EL effnlgMHJnbnp0HNK6PTg5JS5Cj4AJ4prEzADb6+JXeCULL2mIavAxh4ukBslcQpky2fzhfkIvnfi f5oCNhXuG/Ahmn+f96qa5dLKGQoRSoyIdzXZ5oSX8RWLJqQTwd4kqTfLV0uJKzdecuyG3KYGTqzZy 69T/4mwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tKhwC-00000008nvR-3e52; Mon, 09 Dec 2024 17:52:52 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tKhpC-00000008m9V-3Wev for linux-arm-kernel@lists.infradead.org; Mon, 09 Dec 2024 17:45:39 +0000 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2efb17478adso969455a91.1 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=lists.infradead.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=ahaBmOaofPf8bpFE0As+JXwdxrrdQCt9BFEFmDJqVjAXTDWUWeDuQ/Be5+yyUFomLE Lm8DVXN1Tyq/tCw95yMs2ASTMAPOudqUYfV4J7f0LeEbTy5MleWjeL4c3w3RUtG72KrH TWn5imbS0dPUxxnwzZ8CFzfN3qNwiN6Eo6ZwI= 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=A+SNXTC/E7bFc5CQCVdlGh0smshuQ2AJW+/gYZ2iB6s7ztHbSzdGvGXz6/mSDRBdEn JEQJVSmXfwd2LhXUXe73MOFVtfTwt/6iQcTVz0w+3fWeiexi8J6Id1cVkDue3+g8HvJV e4WcQD0wO6zXHEdVEEWEjXMY5DqfvTCBmznvhIW0+yr8GAGgDWjDChgcF+iro9jQvDTf VS1UMx/HlbVgUVzzlOUKyHpyJsvbUimjb5tqePOhtDtrtA85hmT7ZumYUHuq3WKxq7T5 v9Vy6n/ci15qrEUW/BbSmB1OFNCKIXgz+aL2TYbV76QND5nLSISlDwi83+92ruAGg14L eZ+w== X-Forwarded-Encrypted: i=1; AJvYcCVaR3XWtszs3wawfrmVhtrbH4eBpdqyyo2iRNY4jT4rx5AsYSrIXJBCb7rnExFyB7b9l7dZ7u9tg5LVkjhe/IFK@lists.infradead.org X-Gm-Message-State: AOJu0Yz3dvGnlwetGB+VFjhAYUY8mDye6zk2DIPO5ku9TcGadO+tetu3 +GRZSamnF7aiynH3dgw/a1Cg9EYVL3aOKKzQPgeSNT3hhy8osZzS/qU4DgURbw== X-Gm-Gg: ASbGncvAeYx2c7z9Y05LhHMYWVJLxV4s5tlgLPeGuF4EBWl4eXg3NEREFPnMRoh7QDT hOb/L6XszDsLDXJ2rYoXellZSy7C0vxYh3fPFAouwtyvgsRIGNgCToOo74eMbMUoBAjPKkHaCCu ihjBBFOw5SWxsK+pOcHAVGLsIwFeMYnriGmQeP7ke6bThC2eqHlOWeZRn2RaXHYGUKRChXekyyn 82UFERrdqbvTOIAs4D7wPYa+ecv9fqQ3TcUhKeSoXFMwpQqU8ZxX9r1nbMqJ6E5m1a3Sg== 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241209_094538_874402_C3E37E03 X-CRM114-Status: GOOD ( 12.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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[] = {