Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp209797lqd; Tue, 23 Apr 2024 22:39:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVg7AkygQopPPsCpQdSzp8cVg8gtwRac7oHR+NkRwVimYCGq+Ap3U5asp4awLT3a+QRXxLXN+dmpTrtIUv9dW5aaWI8VzoO0AmBvpXx7A== X-Google-Smtp-Source: AGHT+IF8JMqyQRwVXP0Fsba1Td6vHg6IxAte4eItHVz5ZAjBFM6TO1wShnWRHUuv180Q1euZl2kX X-Received: by 2002:a17:906:ce5b:b0:a58:8fa6:df18 with SMTP id se27-20020a170906ce5b00b00a588fa6df18mr638161ejb.41.1713937188288; Tue, 23 Apr 2024 22:39:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713937188; cv=pass; d=google.com; s=arc-20160816; b=bWmD9dLassTWDqS+z7MNhgabatipxeCAaPDgOCJ6/pnqvOJdvzCO3d9bAgX9XFoKPs RbdZr5V/41KOZQ7h8nmNdfW2ZQR+gMZY1RKt1hg5nDwqlIXU7Iy76Pmk+foQiYvvWyOj uGvrIwt3Ivk/J1bQ3T5nC+ncN3fVcNzf3GJlr7WnG5kDvhMb3ydEcNsOtDPcXfX9LWp7 Zsc+WdjORah/uOFQJYU+7VBbPbfNTO2W7L4+rHAzETgj/XQazRIjvOhsa2uEDcGu4dF3 V7fBy241YH5yL5NYm6RjnRorQma0rlDHrRmSzU2rSaLibJwKQA5HB91C5ohSccFnArb+ 3jlw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QTXQhiqPR8UpWolJVAux0oZg2xcvHqUAKFNDge+8IR4=; fh=n7cliQ4HFgozDRhIsYgtU9ja6s/RVWF5pv+bgDdfGws=; b=p/4tjsS4WnvT/8SWimttqAYtH+naSYd2d34DZKBV8JtTAQ9rjw5kvV7rooIfwZg7RS x9Ok9/49EQ2uAAuMnvJ2WhZvjY+BEyjv2rsDu7RdQB/DZGyNGNCxvjkljnJOz42jSnjd d9nYzseGxstjOW5VCDVM4TEaABRkVGF/LmRuIZXeT5PaJZfm4/kcf5eHImi8yk8zEgfG zdL8lyOahv0Hl+Mjy+Fy7CVSWYTFHMnMyzfwuWDKLJctTVd32dfWslvpuEqTyrGFLyQo StU4HGnXZ8FZFiP8+L0zDWmqSTvsrZa6YIv1qqs/koOZSva3+o73iLk4FaOuRcHKEFVk jmeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tc4cK+IU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-156323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id le13-20020a170906ae0d00b00a5190b11420si7608698ejb.250.2024.04.23.22.39.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 22:39:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tc4cK+IU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-156323-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156323-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 09C731F23F62 for ; Wed, 24 Apr 2024 05:39:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA73A15667F; Wed, 24 Apr 2024 05:39:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Tc4cK+IU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1A6813CFAD for ; Wed, 24 Apr 2024 05:39:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713937183; cv=none; b=nJxSwDSwll1k5lGrkVOVWetC6oBOt0BdSSSN84gQFdNO5ZkGhGIFtF9/A7LTMLgyVscvOhkyhl8Lc2H6muVTd3zOOBKH8q/t3lf3dC8rMIQyElksp+b6q6h7Pp8yA6klaBTEFCHu2bv5Eikp98BFBmk7XsQRYS5Efu1uJFx0PJ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713937183; c=relaxed/simple; bh=Yws6ZbleFBhbnE7nhrQmbFagTNx3rTvdGwwajD+oWlA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SVFsgCREMj2A2NFbhyD25wO8A4BQ3uxkgxbA9wPSACa4vVpv7Jfeugyvi/WufqZfKOLL7Uq5B9jBeEan1otSmLPg+Mn5YCTf34I6Z0vJiATu9AfTV+npmM9SUlNLdWSoG6ZkEszdpNYLqpY/qQBWlVLIQ9bERI23d3wMAkIVqy0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Tc4cK+IU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AF9DC113CE; Wed, 24 Apr 2024 05:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713937182; bh=Yws6ZbleFBhbnE7nhrQmbFagTNx3rTvdGwwajD+oWlA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tc4cK+IUOAvwyFMaaTYmPgvzFu99UYEkr87vBeU8ToxzsurCZGHudx+VM6qODGmOm swaWLjovCNvLIdq+DefQ6d/Dlvm38Z2YR486HCMAFflkhxSP9msnUXHCVfZTTJeGJo 0If5aMm6LrtZPae4Jh6EMJKGuhRIvgFblfvkSW9S7YOvfUJwoT5MNcU5y+IG0PA7yc BPJQk2McVF9f3tuq6nSV0OymE/ixcQIjsMfVEfl1GiEFehUajYUm1T1eaiFbqqHm+V 7aLURrZ3+FpYz766dAdL9rTQSOFKWEGzqiFfg6j7ulfWwEOpEu7pRL4NPU2E/2EY4v g2vXNtCWUjwsg== Date: Tue, 23 Apr 2024 22:39:40 -0700 From: Josh Poimboeuf To: Sean Christopherson Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra , linux-kernel@vger.kernel.org, Stephen Rothwell , Michael Ellerman , Geert Uytterhoeven , Will Deacon , Linus Torvalds Subject: Re: [PATCH v2 2/2] cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n Message-ID: <20240424053940.3ypivvztvv35dpu7@treble> References: <20240420000556.2645001-1-seanjc@google.com> <20240420000556.2645001-3-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240420000556.2645001-3-seanjc@google.com> On Fri, Apr 19, 2024 at 05:05:55PM -0700, Sean Christopherson wrote: > +#ifdef CONFIG_CPU_MITIGATIONS > extern bool cpu_mitigations_off(void); > extern bool cpu_mitigations_auto_nosmt(void); > +#else > +static inline bool cpu_mitigations_off(void) > +{ > + return false; > +} This should probably return true? -- Josh