Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp384199imw; Tue, 12 Jul 2022 23:17:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vxH0w0u89v6KbMU+R11s0EEcM7hivS92RC622hGh9VgHb3bs7RpmBfGvLSWWY4yaeCTPrm X-Received: by 2002:a17:902:9307:b0:166:41a8:abc0 with SMTP id bc7-20020a170902930700b0016641a8abc0mr1747353plb.135.1657693079159; Tue, 12 Jul 2022 23:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657693079; cv=none; d=google.com; s=arc-20160816; b=c+tUssaebPXtZHgXxEZ53jtufGlAAxKsHhhgrYKt3eKk1JJUDj5eUZ7PYm47VH3F7X 21V2KqwQcM2yV854fcpeP4/3D00BLPN3kJlLI75fDdC3p5EHUU2g+SNQ2ZALxwWXEhNs pXzkE8mMXIH5waiZkHniauHD8+EbTQWhi4lL/iNhaSjcFXf/wmWgA1AdOt4IipFdsznp lfjHz2GKBaA9a3maOVXEfAlopZIFI4S7PPprzvjvEV4ObIPWmbib1naBV4lIhNfoIG1U g+2BtKshHa2Wvr0omMibwydjAvQeNt+82Cn2WgEcZebrVT72MqTvIrJDDNUDNtEuKfq3 /lcA== 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=X6apOzClSx/8DHrLxnJc/BlFLThbg3ulbD33xp+QubU=; b=jkNqL6QWqHN3grqxhXBzj4dV61gS8ZFWh4x8Ert7LqfdtfyKJkWtmcwQzTef1j/LiI 3NXVfgj9sFdY7iKUmUWxA0Mk1rZfKq91R7xRFB8AnqKcCRYRpeAK0j+pH9sgYuWsURQS X9YVEc0shxPlCwy8dEwNtWROQwQzUlnEBhIpfOO3HaAGZJU2JiTgfqOQswR9g+j/uCUQ o1yyq9eT3DSAPH9N0iMcn3rBDYpS7WD2Zj63/kR3gqIJU/f9lZ5fYCVSq7su7JTKkn53 skWIsaZnqinY+8ipEFrwPy6mXkQ+GthQst+fgU1H6r5MT+xqQ87O7NbXnLSM1xrd/2uQ i1QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XqpAoqyn; 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 a5-20020a170902ecc500b0016c049ada3csi18820994plh.454.2022.07.12.23.17.45; Tue, 12 Jul 2022 23:17:59 -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=XqpAoqyn; 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 S234346AbiGMFli (ORCPT + 99 others); Wed, 13 Jul 2022 01:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234315AbiGMFlU (ORCPT ); Wed, 13 Jul 2022 01:41:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFBD43E74B; Tue, 12 Jul 2022 22:35:10 -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 1B2F4B81C13; Wed, 13 Jul 2022 05:35:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D31EC3411E; Wed, 13 Jul 2022 05:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657690507; bh=C6Qvmu8YGI/7zZ+PW9nfbi7sR3QFFcB/JWTbSIlVJFg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XqpAoqynsEuoTHKPzK+XyGdIWKe+7LwOpsOoLz0GOmgpMQt0yAIdlRHvR1/dz0gpL f1wM4YPqOe8Q45XvOqaqsBLBLObiEYHaMn3MGzSN6Anu69/mnWCc1y+6OwF0hxgOsi asY0eSNZbsKov8qKtbpNnfhOgwkmycFbKcbnl7ew= Date: Wed, 13 Jul 2022 07:35:02 +0200 From: Greg KH To: Chuck Zmudzinski Cc: linux-kernel@vger.kernel.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Dan Williams , "Kirill A. Shutemov" , Tom Lendacky , Brijesh Singh , Jane Chu , Tianyu Lan , Randy Dunlap , Sean Christopherson , Jan Beulich , Juergen Gross , xen-devel@lists.xenproject.org, stable@vger.kernel.org Subject: Re: [PATCH] x86/PAT: Report PAT on CPUs that support PAT without MTRR Message-ID: References: <2885cdcaccffd287ef69c7509056ddf183a38a0e.1657647656.git.brchuckz.ref@aol.com> <2885cdcaccffd287ef69c7509056ddf183a38a0e.1657647656.git.brchuckz@aol.com> <008ff24c-d059-8d39-5e57-6f5e9de0dcbf@netscape.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <008ff24c-d059-8d39-5e57-6f5e9de0dcbf@netscape.net> 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 Tue, Jul 12, 2022 at 03:57:45PM -0400, Chuck Zmudzinski wrote: > On 7/12/22 3:26 PM, Greg KH wrote: > > On Tue, Jul 12, 2022 at 03:16:01PM -0400, Chuck Zmudzinski wrote: > > > On 7/12/22 2:36 PM, Greg KH wrote: > > > > On Tue, Jul 12, 2022 at 02:20:37PM -0400, Chuck Zmudzinski wrote: > > > > > The commit 99c13b8c8896d7bcb92753bf > > > > > ("x86/mm/pat: Don't report PAT on CPUs that don't support it") > > > > > incorrectly failed to account for the case in init_cache_modes() when > > > > > CPUs do support PAT and falsely reported PAT to be disabled when in > > > > > fact PAT is enabled. In some environments, notably in Xen PV domains, > > > > > MTRR is disabled but PAT is still enabled, and that is the case > > > > > that the aforementioned commit failed to account for. > > > > > > > > > > As an unfortunate consequnce, the pat_enabled() function currently does > > > > > not correctly report that PAT is enabled in such environments. The fix > > > > > is implemented in init_cache_modes() by setting pat_bp_enabled to true > > > > > in init_cache_modes() for the case that commit 99c13b8c8896d7bcb92753bf > > > > > ("x86/mm/pat: Don't report PAT on CPUs that don't support it") failed > > > > > to account for. > > > > > > > > > > This patch fixes a regression that some users are experiencing with > > > > > Linux as a Xen Dom0 driving particular Intel graphics devices by > > > > > correctly reporting to the Intel i915 driver that PAT is enabled where > > > > > previously it was falsely reporting that PAT is disabled. > > > > > > > > > > Fixes: 99c13b8c8896d7bcb92753bf ("x86/mm/pat: Don't report PAT on CPUs that don't support it") > > > > > Cc: stable@vger.kernel.org > > > > > Signed-off-by: Chuck Zmudzinski > > > > > --- > > > > > Reminder: This patch is a regression fix that is needed on stable > > > > > versions 5.17 and later. > > > > > > > > Then why are you saying it fixes a commit that is in 4.4.y and newer? > > > > > > > > confused, > > > > > > > > greg k-h > > > > > > It is true the erroneous reporting of PAT goes back to 4.4.y. But it > > > was not until 5.17.y when the i915 driver was patched with a commit > > > that started using pat_enabled() instead of boot_cpu_has(X86_FEATURE_PAT) > > > and that is when a regression that started annoying users appeared > > > in the kernel. I presume that we only backport patches to stable that > > > fix regressions that are really bothering users, so even though the > > > problem dates to 4.4.y, there is no need to backport before 5.17.y > > > which is when the problem manifested in a way that started > > > bothering users. > > > > If it needs to go back to 4.9.y or so, let's take it all the way back to > > be consistent everywhere. > > > > thanks, > > > > greg k-h > > I presume you want me to prepare the backport patches, or at > least the ones that need the patch to be significantly modified to > apply to those branches. I expect older versions will need the > patch to be significantly modified to apply. If not, please let me know. I will not know until it hits Linus's tree and the patch is backported then. If there are problems, you will get an email at that point in time. > Is 4.9.y the oldest version we are still supporting? Yes, the front page of kernel.org lists the active kernel versions. thanks, greg k-h