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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32FAFC7EE2C for ; Sun, 28 May 2023 07:39:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229472AbjE1Hjf (ORCPT ); Sun, 28 May 2023 03:39:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjE1Hje (ORCPT ); Sun, 28 May 2023 03:39:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01B65B4 for ; Sun, 28 May 2023 00:39:34 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 8924460F82 for ; Sun, 28 May 2023 07:39:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A14AAC433EF; Sun, 28 May 2023 07:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1685259573; bh=RomlE0ncdTqBVb/ExtKs95ZbISMxV8bJdd8w80tKlpU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=n1NlUSk0PYs6RvQx/hNGcOH0QEOsVN8WGJRwI1B96/EiLfrxCdQV0DINy+4jrUCFK w0u25Tk+neD6/mt8ou0XqBCugH+gfEUb1CNoQpE17kfCYlEW6h53/EuM/6ZLevC44+ U+CpnPFifUwF7VaNcxnxv3iRbCs65zFVlpX0/dRE= Date: Sun, 28 May 2023 08:39:30 +0100 From: Greg KH To: Daniel Sneddon Cc: stable@vger.kernel.org, dave.hansen@linux.intel.com, tglx@linutronix.de Subject: Re: [PATCH 5.15.y] x86/mm: Avoid incomplete Global INVLPG flushes Message-ID: <2023052820-lilac-email-41e1@gregkh> References: <2023052612-reproach-snowbird-d3a2@gregkh> <20230527001834.1208927-1-daniel.sneddon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230527001834.1208927-1-daniel.sneddon@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, May 26, 2023 at 05:18:34PM -0700, Daniel Sneddon wrote: > From: Dave Hansen > > The INVLPG instruction is used to invalidate TLB entries for a > specified virtual address. When PCIDs are enabled, INVLPG is supposed > to invalidate TLB entries for the specified address for both the > current PCID *and* Global entries. (Note: Only kernel mappings set > Global=1.) > > Unfortunately, some INVLPG implementations can leave Global > translations unflushed when PCIDs are enabled. > > As a workaround, never enable PCIDs on affected processors. > > I expect there to eventually be microcode mitigations to replace this > software workaround. However, the exact version numbers where that > will happen are not known today. Once the version numbers are set in > stone, the processor list can be tweaked to only disable PCIDs on > affected processors with affected microcode. > > Note: if anyone wants a quick fix that doesn't require patching, just > stick 'nopcid' on your kernel command-line. > > Signed-off-by: Dave Hansen > Reviewed-by: Thomas Gleixner > Cc: stable@vger.kernel.org > (cherry picked from commit ce0b15d11ad837fbacc5356941712218e38a0a83) > Signed-off-by: Daniel Sneddon > --- > arch/x86/include/asm/intel-family.h | 5 +++++ > arch/x86/mm/init.c | 25 +++++++++++++++++++++++++ > 2 files changed, 30 insertions(+) All now queued up, thanks. greg k-h