Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp120981imw; Thu, 14 Jul 2022 22:32:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v8lXMsC0BNfyJcZBmVeOYhEf6boC5S7ZMRHYPeH/Z0kBlKSHlmc2VJr+GEYBqpf63K5KVd X-Received: by 2002:a17:90b:70a:b0:1f0:b12:ebe4 with SMTP id s10-20020a17090b070a00b001f00b12ebe4mr19595290pjz.184.1657863169388; Thu, 14 Jul 2022 22:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657863169; cv=none; d=google.com; s=arc-20160816; b=Sg1wOZqwB+VpAZKzilxamP3bWnPSfQbs0BIPQXHJVhRxFHAAxVLa1KLzUJP3vLH/fk UCBnOVDG0pPNfM8NyzGuS4iPFkwYMA00evTs7gPFfIcP+OvApAXYq1geVBDD5SZDuTh5 zC6aAryam8pHpKJk76P/ZACDZVzj7qvfsPVoqird08kTKiyHYhxXygODx8wtOiyOIsVL NwOJIV0GnQF2i0ZxOgT185hxDoEFH8CqJli1K9NHxeAB5I5ONAlUjXUfZoY0jnXEdLGu NXyJ1DgzpZlCK/wRQxMlRBt8RqFi83U288C3UkKb4prTTLudaaRVmG/HC8xckMFulsZu fW8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EieDbNmOGEHub6/97mv090yN8mHz71+X8drDK/tEl24=; b=IgoOsVr60xafRsDtL4vI6IL1xf/ioP6fLnNDWAe/VtQFVYFe/gynNEnaCZcZLeOvhP 6ryvSltX0TebdAem0lGDyrYW3iN6tCcqZsTBEgXr678Bv34jhOJysS4ntQk6DInsO/hO uHl6oBv/C9ZtwkEkA9fL17BZHHAIG4rUgt0k4EH2V42ocr5v3x1jLI1ZUuwIfYh6/wKT qLuN9gB0jJ0Q1EEkv3pLqRPbnOrWHYfCmvAcied1eailZl5CIQGs3xBFv9lfGZDtrlVr qcMUSH/Yr4NOxN2NZQulN/H+NTf/IJymSFYbqmAl4vdutJ3o4SpP/tgdM1SqdX4qhxZi BjuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mtMKX97g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cc21-20020a17090af11500b001ed1871bb53si870166pjb.2.2022.07.14.22.32.34; Thu, 14 Jul 2022 22:32:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mtMKX97g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229759AbiGOFZv (ORCPT + 99 others); Fri, 15 Jul 2022 01:25:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiGOFZt (ORCPT ); Fri, 15 Jul 2022 01:25:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E2BE79EE1; Thu, 14 Jul 2022 22:25:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AA8D7B82A9C; Fri, 15 Jul 2022 05:25:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94F7FC341C6; Fri, 15 Jul 2022 05:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657862746; bh=LibR5gdvV1FppPi6j75ld0+91VGoEGhnyLiUEP6tYQ0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mtMKX97g3Hj6YyhNNICTmKA5pXMgFEWWpCPjBDfGUw5IYNXyXHPCnsnk4MlOZ+s8c 1TqvylvtTct8JUGejaqXrdKyK4l96fFrfPmGwZ5baFt0YO/wvEr0VOPbx6BYCDa2gV W7WJxSabjjXH0SAQq1ZVU+e3upO2rVp51qr10OLk= Date: Fri, 15 Jul 2022 07:25:43 +0200 From: Greg KH To: Pawan Gupta Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Daniel Sneddon , antonio.gomez.iglesias@linux.intel.com, Josh Poimboeuf Subject: Re: [PATCH v2] x86/bugs: Warn when "ibrs" mitigation is selected on Enhanced IBRS parts Message-ID: References: <0456b35fb9ef957d9a9138e0913fb1a3fd445dff.1657747493.git.pawan.kumar.gupta@linux.intel.com> <2a5eaf54583c2bfe0edc4fea64006656256cca17.1657814857.git.pawan.kumar.gupta@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a5eaf54583c2bfe0edc4fea64006656256cca17.1657814857.git.pawan.kumar.gupta@linux.intel.com> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2022 at 04:15:35PM -0700, Pawan Gupta wrote: > IBRS mitigation for spectre_v2 forces write to MSR_IA32_SPEC_CTRL at > every kernel entry/exit. On Enhanced IBRS parts setting > MSR_IA32_SPEC_CTRL[IBRS] only once at boot is sufficient. MSR writes at > every kernel entry/exit incur unnecessary performance loss. > > When Enhanced IBRS feature is present, print a warning about this > unnecessary performance loss. > > Signed-off-by: Pawan Gupta > --- > v1->v2: Instead of changing the mitigation, print a warning about the > perf loss. > > v1: https://lore.kernel.org/lkml/0456b35fb9ef957d9a9138e0913fb1a3fd445dff.1657747493.git.pawan.kumar.gupta@linux.intel.com/ > > arch/x86/kernel/cpu/bugs.c | 3 +++ > 1 file changed, 3 insertions(+) This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.