From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1591C43381 for ; Thu, 28 Feb 2019 18:21:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AA2BD2084D for ; Thu, 28 Feb 2019 18:21:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rwEumLlp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA2BD2084D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HyRvFlBwlhkit1d3P0uFmbOL5pKtWiOYUM4Rvw74WUU=; b=rwEumLlpJQvUVW XsOQW9Es+cnuZt4z5eoDDmI2QevrHUEFVV42v4Wyu0J4ubIslQ3M2bP0R2nTTxxr7xzY7roSEa7BV Z+72peJYw+XptHorf87LMK6Ol8pdpz07EAAhZMNwRAN63yWs1JpgGP05SfPp6v8mRmWTjyRTBNXVy 7qqhnyzp1xNf9kRkPvgEPWF9D5UHjPHdVmtzljPMziFMKqzd40c+SvpFpUmNgJYLRan+YrR9mSICv 4/TwHV4ftcQrn5uwquvVlmrrHt7PSW5zblga5RreIiGtVc9XadKEd1W2FSlBzXe/wphEinqnbF0ky VeG6ntteR/ZlF3wmUwPQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzQJX-00086S-PL; Thu, 28 Feb 2019 18:21:47 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzQJJ-0007rR-Gg for linux-arm-kernel@lists.infradead.org; Thu, 28 Feb 2019 18:21:35 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ED7D5EBD; Thu, 28 Feb 2019 10:21:31 -0800 (PST) Received: from arrakis.emea.arm.com (arrakis.cambridge.arm.com [10.1.196.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9329F3F5C1; Thu, 28 Feb 2019 10:21:29 -0800 (PST) Date: Thu, 28 Feb 2019 18:21:27 +0000 From: Catalin Marinas To: Suzuki K Poulose Subject: Re: [PATCH v5 01/10] arm64: Provide a command line to disable spectre_v2 mitigation Message-ID: <20190228182126.GA252518@arrakis.emea.arm.com> References: <20190227010544.597579-1-jeremy.linton@arm.com> <20190227010544.597579-2-jeremy.linton@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190228_102133_716285_E496D223 X-CRM114-Status: GOOD ( 15.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mlangsdo@redhat.com, linux-doc@vger.kernel.org, julien.thierry@arm.com, marc.zyngier@arm.com, andre.przywara@arm.com, corbet@lwn.net, will.deacon@arm.com, linux-kernel@vger.kernel.org, jeremy.linton@arm.com, stefan.wahren@i2e.com, linux-arm-kernel@lists.infradead.org, dave.martin@arm.com, shankerd@codeaurora.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 28, 2019 at 06:14:34PM +0000, Suzuki K Poulose wrote: > On 27/02/2019 01:05, Jeremy Linton wrote: > > There are various reasons, including bencmarking, to disable spectrev2 > > mitigation on a machine. Provide a command-line to do so. > > > > Signed-off-by: Jeremy Linton > > Cc: Jonathan Corbet > > Cc: linux-doc@vger.kernel.org > > > > diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c > > index 9950bb0cbd52..d2b2c69d31bb 100644 > > --- a/arch/arm64/kernel/cpu_errata.c > > +++ b/arch/arm64/kernel/cpu_errata.c > > @@ -220,6 +220,14 @@ static void qcom_link_stack_sanitization(void) > > : "=&r" (tmp)); > > } > > +static bool __nospectre_v2; > > +static int __init parse_nospectre_v2(char *str) > > +{ > > + __nospectre_v2 = true; > > + return 0; > > +} > > +early_param("nospectre_v2", parse_nospectre_v2); > > + > > static void > > enable_smccc_arch_workaround_1(const struct arm64_cpu_capabilities *entry) > > { > > @@ -231,6 +239,11 @@ enable_smccc_arch_workaround_1(const struct arm64_cpu_capabilities *entry) > > if (!entry->matches(entry, SCOPE_LOCAL_CPU)) > > return; > > + if (__nospectre_v2) { > > + pr_info_once("spectrev2 mitigation disabled by command line option\n"); > > + return; > > + } > > + > > Could we not disable the "cap" altogether instead, rather than disabling the > work around ? Or do we need that information ? There are a few ideas here but I think we settled on always reporting in sysfs even if the mitigation is disabled in .config. So I guess we need the "cap" around for the reporting part. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel