Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp31088imw; Thu, 14 Jul 2022 19:46:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tkjnyvG9IeWBfIJxZ5arWshH/V3tPUwdEaiYcFCy4IwiakNlsZJCu4D6Th9fLQYUxvcAJ+ X-Received: by 2002:a05:6402:4c3:b0:43a:f612:179d with SMTP id n3-20020a05640204c300b0043af612179dmr16259870edw.422.1657853216728; Thu, 14 Jul 2022 19:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657853216; cv=none; d=google.com; s=arc-20160816; b=g+00BqV/GiYHnFG5Scbzemb0CkFo0/DeuWdF8aXIMFY+0X1mY+pwJV/uPBHkZc8Pjm bsJ6Gpq08EmXvA4ZNVLHPhhd7zRuEGmaw9PQbGxRoh9UQl6AIT5MrHdIroW+uey+PKyH OkF9XCvNf5SwZU+ntO/TFQzWKzsH0KPWZNH5DWlG+5SKOdcRUer1ySwYJIeEfqbkkcMi h/sk/CFdtsh5VtjltSZpWUcj4qYmbz6gOIh55Bbzu4F3RpWGPE+5U9Wo3HV9WHh5P5sd Iqyk9emb0CCGABIbpclijpf6EpGWY6uDm1oiM6DAa1fD/ViGxwZ0kYbDE/gMsjXR8uLc gfaw== 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=aEE4/Euh2qHrAILYfvyldQi2IAPiIrDYYbfnuSlUsBw=; b=TNOo7Se1uyjX7RX0N5cSJnO4UFLBT/CfkaE+PQY6Gn/cHNT32vOh48U1bgEWWcRFOg EcUH4PyCDPSYGtpafcIEZr9+tTj/19TF355is+tYy0I5Nd3OZgUVkiY7WxOnPxiPS5PH MOPEdTFyK3Um7WA1JQ8Vkmr0IjDrYHPZ7G3lO7rLZqwXfwiB0XkK4TXJUFja9jLyw+f+ uPPQGueCFVfIJuB8Uufck1Do4rhOVLd5r4570NrLFCGSucomBVN5NPi4arScpoJoVBTi ifMWyQ/Y7JagCT4icfctyn8+WqQ0LD2rW33QgGmCjq5Y7OcdIooXmylk8S9/DWO/T2Th H78A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jTrtCK61; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ko18-20020a170907987200b00726b4533cd1si4310846ejc.170.2022.07.14.19.46.31; Thu, 14 Jul 2022 19:46:56 -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=@intel.com header.s=Intel header.b=jTrtCK61; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241168AbiGOCAO (ORCPT + 99 others); Thu, 14 Jul 2022 22:00:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241169AbiGOCAL (ORCPT ); Thu, 14 Jul 2022 22:00:11 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E2BA6EEAA; Thu, 14 Jul 2022 19:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657850410; x=1689386410; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=aEE4/Euh2qHrAILYfvyldQi2IAPiIrDYYbfnuSlUsBw=; b=jTrtCK61HWmXWGb9TqBc+TVnaKT7g8riDFL9STem6KULywif1xpcybJO oTwjdM5l2QW3pJEOkZVWxfz4D0tkWMYQqZ1y3i5/E/GWiX/FjWehbwsO5 DCD/BvSwEMSfV/ixqO7aNDWbl9w82zRhY8HXYn4PUS/Bxh+JlJV+ER8Yt qyQwUH5z8Wcjxn2OK3d2EV5t1q14pS/8tsAFNPxeLCaSgHtPQ/4PwPahf D1zk+N4Mk+m6jW1wOAQ3zvnvFqu2Aim3YQTzXQRnn85f5N3pr2dm6mDl0 yCoYpqSgkQOh6A6BXUiC7wRxs0+v8+PZJNcz+Olc7Uq2IRNIFsvM/vzUZ Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10408"; a="283237144" X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="283237144" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 19:00:10 -0700 X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="738490446" Received: from pravinpa-mobl.amr.corp.intel.com (HELO desk) ([10.212.243.89]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 19:00:09 -0700 Date: Thu, 14 Jul 2022 19:00:05 -0700 From: Pawan Gupta To: Thadeu Lima de Souza Cascardo 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: <20220715020005.dixdi3qpb23iz6up@desk> 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=utf-8; format=flowed Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,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 09:11:18PM -0300, Thadeu Lima de Souza Cascardo wrote: >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 > >Reviewed-by: Thadeu Lima de Souza Cascardo Thanks for the review. Pawan