Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8404778ybl; Thu, 16 Jan 2020 16:12:09 -0800 (PST) X-Google-Smtp-Source: APXvYqz3fiQOEQD8jHaQj5TMXGLIO9i/wol9EO7y9dc1zNvr0r82vARkcytefogyszXUh/eE/i4Z X-Received: by 2002:a05:6808:24e:: with SMTP id m14mr1488258oie.168.1579219929218; Thu, 16 Jan 2020 16:12:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579219929; cv=none; d=google.com; s=arc-20160816; b=xZnKq5w0FUBMD9xnyX77zpx6vz667gDy8kDiaA7y00EfE+EWVjvCYYP2lL+qM8Esxk 5ZigZXP8d01NPdc8ZaU87HxfvupH+/eQEmIU/wDpd/8XmUxVztRjhKOuWmzisYF2BOrS +mOY6qbIoroyLyYs1qlp6r/vkB39SY/Od3J+kphsvmqZiAllaDPnfwtMZLfZget00meC ByVzCp81KjXmm/Ay2HtHc+7Fq03UYY5c2Hhs6yWtXTuPEtlmC74EHICgY5wop1pb6AAZ w/AIYRp/H5MsAG8bl/SCuV4QPNGWitLXl9Tf303tjzhZKhtXLS+b2k6N0VQMW604c7SO 6g5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=gK7SvK8o2VK467ucgJKt8aMirwDA5UpWtidaibh6gf0=; b=ik9psLe02UWJwyOIi7bLKxeTi7LJ65VjQchrNfWvByXtfzFCg5LYlgUY1s9gwuMwRr lfLPXDFdO8bbxeK8IwudcW/3czha+y3gwN5IcJazInPbktb8HuFVtiuSCLdo/brGRMaQ SEd1wz3rfQiUQ6fag2qOFsDcrBS/SQIiU/Cc2P2lhttBvf1GoYV80HN7zqGofR8i9jc9 pcHjOLg9hves8Prwu2psJwRd7sucwfzi6A1YMTNIXaD9AEcA2ws9lUcw9PlHNnQEI+Cd kYwQEhGR16R6HKaw0VF0ElTeng2fDu3C4mMOfrOOLN86LYH7kMvLvmTSLyplMHnIgeiz JoxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=baRcoXVG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si12274592oih.206.2020.01.16.16.11.56; Thu, 16 Jan 2020 16:12:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=baRcoXVG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733205AbgAPUEw (ORCPT + 99 others); Thu, 16 Jan 2020 15:04:52 -0500 Received: from mail26.static.mailgun.info ([104.130.122.26]:34667 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729208AbgAPUEw (ORCPT ); Thu, 16 Jan 2020 15:04:52 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1579205091; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=gK7SvK8o2VK467ucgJKt8aMirwDA5UpWtidaibh6gf0=; b=baRcoXVGTQQW8LkSWBbKdMgiHnV09vyN7zudxuIUJa7AmN069aBOdMGShjp3pVLIf7lMUBCP 5qH14+gVaqKuUhGnFqPy9THK096UJzp7t7g0SGZvZK6Lro4H/sMN/CQ/cMH6HiFcdPr+avdf fQ973tPKXw3Br60iCCm+E36P7tE= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e20c1dd.7fefd590ca40-smtp-out-n02; Thu, 16 Jan 2020 20:04:45 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 5B721C433CB; Thu, 16 Jan 2020 20:04:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: saiprakash.ranjan) by smtp.codeaurora.org (Postfix) with ESMTPSA id E3D65C43383; Thu, 16 Jan 2020 20:04:43 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 17 Jan 2020 01:34:43 +0530 From: Sai Prakash Ranjan To: Doug Anderson , Will Deacon Cc: Jeffrey Hugo , Catalin Marinas , Marc Zyngier , Andre Przywara , Mark Rutland , LKML , linux-arm-msm , Linux ARM , Stephen Boyd , Bjorn Andersson , Matthias Kaehlcke , James Morse , linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH] arm64: Add KRYO{3,4}XX CPU cores to spectre-v2 safe list In-Reply-To: References: <20200116141912.15465-1-saiprakash.ranjan@codeaurora.org> <20200116153235.GA18909@willie-the-truck> <1a3f9557fa52ce2528630434e9a49d98@codeaurora.org> Message-ID: <72d92c46e1f87d02f55c5a12dcd25a35@codeaurora.org> X-Sender: saiprakash.ranjan@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2020-01-16 23:57, Doug Anderson wrote: > Hi, > > On Thu, Jan 16, 2020 at 8:11 AM Sai Prakash Ranjan > wrote: >> >> Hi Will, >> >> On 2020-01-16 21:02, Will Deacon wrote: >> > [+Jeffrey] >> > >> > On Thu, Jan 16, 2020 at 07:49:12PM +0530, Sai Prakash Ranjan wrote: >> >> KRYO3XX silver CPU cores and KRYO4XX silver, gold CPU cores >> >> are not affected by Spectre variant 2. Add them to spectre_v2 >> >> safe list to correct ARM_SMCCC_ARCH_WORKAROUND_1 warning and >> >> vulnerability sysfs value. >> >> >> >> Signed-off-by: Sai Prakash Ranjan >> >> --- >> >> arch/arm64/include/asm/cputype.h | 6 ++++++ >> >> arch/arm64/kernel/cpu_errata.c | 3 +++ >> >> 2 files changed, 9 insertions(+) >> >> >> >> diff --git a/arch/arm64/include/asm/cputype.h >> >> b/arch/arm64/include/asm/cputype.h >> >> index aca07c2f6e6e..7219cddeba66 100644 >> >> --- a/arch/arm64/include/asm/cputype.h >> >> +++ b/arch/arm64/include/asm/cputype.h >> >> @@ -85,6 +85,9 @@ >> >> #define QCOM_CPU_PART_FALKOR_V1 0x800 >> >> #define QCOM_CPU_PART_FALKOR 0xC00 >> >> #define QCOM_CPU_PART_KRYO 0x200 >> >> +#define QCOM_CPU_PART_KRYO_3XX_SILVER 0x803 >> >> +#define QCOM_CPU_PART_KRYO_4XX_GOLD 0x804 >> >> +#define QCOM_CPU_PART_KRYO_4XX_SILVER 0x805 >> > >> > Jeffrey is the only person I know who understands the CPU naming here, >> > so >> > I've added him in case this needs either renaming or extending to cover >> > other CPUs. I wouldn't be at all surprised if we need a function call >> > rather than a bunch of table entries... >> > >> > That said, the internet claims that KRYO4XX gold is based on >> > Cortex-A76, >> > and so CSV2 should be set... >> > >> >> Yes the internet claims are true and CSV2 is set. SANITY check logs in >> here show ID_PFR0_EL1 - >> https://lore.kernel.org/patchwork/patch/1138457/ > > I'm probably just being a noob here and am confused, but if CSV2 is > set then why do you need your patch at all? The code I see says that > if CSV2 is set then we don't even check the spectre_v2_safe_list(). > I am a noob here and didn't understand what Will meant ;). V2 posted now. Thanks, Sai -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation