Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5082imw; Tue, 12 Jul 2022 13:24:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v/6JUt+pVHSIXmZQEF/htPBy8xggw+6UtBUlFgcDl6MVWOIbVMVqx1ZxahkI9jjgaYah7a X-Received: by 2002:a17:902:d50a:b0:16c:5490:163c with SMTP id b10-20020a170902d50a00b0016c5490163cmr7967153plg.31.1657656941898; Tue, 12 Jul 2022 13:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657656941; cv=none; d=google.com; s=arc-20160816; b=sHe982Vis1NQubbFdXdBcgE5DLqFLVPOwYWDI/8Gunf4dy0Jgh8qdqN+tQ/O/S2vdl 4A6eLv6UDLRmBmnu08PVKjrk89sN9rHR9FRaIEHLURxGdW913nlkpVQeVKljyBEil85n tHSvijMgKMfqDQYd5sMUQBbn0HijMxPp1U2uV7bNXDlkcFyVc0tc6DajwjMJPrnr949g 46QSu71pj0PrTV5Ygz7b6zGwcEvSku4A/wZVqG5AXYJFeFk2dNhNtVhj78MwHxWxe7SC CBxNfD3ODYXn6AswDJmg7x7kj0mJphVcLVbJ5+fYF7pVsCn1X1UCD9or3NY1M+PbcKsJ l4Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gVNIDnB0rwg0U52jp8XQ0N1+sFJsTQLMngaDbXUXbMc=; b=u5r1jUDN0CIilsWuUrDNzjcrMVJcB/ugnf50C25vI1ZapVSXlsv7GSnbQCrutvTZ3w +0L+UlfmTzCwFsF5aCubA9D9VhUb4IdyE7+E/JLTHebN26ajvwwffBonAgpHT5cKVmlH l8Fkt5m30Mt5hpOjqgSAsPFjJm8LYJITySOD9CcruSrndmMVqISbFhfmWdN1RDKzw5fu WTd2xXB4Iho0artAN9dFRLsrEsK9qXUZ3ZqQzGQCQx5jVt9uhY+buuCfMcq0eaFeZ8xP zIr96P73uK1Xx30dB0SAm7ZNV0lNq58a/V6qgxQYdteBCWPA822BPE4z3ay3fs2noa6w JsRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netscape.net header.s=a2048 header.b=kVhI3kve; 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=REJECT sp=REJECT dis=NONE) header.from=netscape.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q4-20020a17090311c400b0016a2bfe5c7csi19158457plh.172.2022.07.12.13.15.28; Tue, 12 Jul 2022 13:15:41 -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=@netscape.net header.s=a2048 header.b=kVhI3kve; 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=REJECT sp=REJECT dis=NONE) header.from=netscape.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233872AbiGLT54 (ORCPT + 99 others); Tue, 12 Jul 2022 15:57:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232801AbiGLT5v (ORCPT ); Tue, 12 Jul 2022 15:57:51 -0400 Received: from sonic306-20.consmr.mail.gq1.yahoo.com (sonic306-20.consmr.mail.gq1.yahoo.com [98.137.68.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF85C10C1 for ; Tue, 12 Jul 2022 12:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netscape.net; s=a2048; t=1657655870; bh=gVNIDnB0rwg0U52jp8XQ0N1+sFJsTQLMngaDbXUXbMc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=kVhI3kveFTbqCZCXcm5KMuGkeSj49gYXQgkACEx7MdQKIiDicrsy7FQOyHbz/ZC+cfjNmlgekM6pGmU6CHx+uTcIBJXhvLHi9J09UcMBiRhX8nyYD7ZuPOflZU/qwvvk16G3gKd0OkCS/s8oDEjtUJe/SobaVSKkLRVb8dcvfLSj5y1+TOFP8kfoyMy+2clfDJmYs3lQcqg92a77xLzuIlnnlZ4WeIQlIrxzV5F4EfWb/Bu2+vFkSk2NLezjg7lRgFrIHVmqLvUNnBxKK03wGK5StOtNS9dtXM6y+u4j5Tm2w2dFWSC/4KWllYRrM1pBk9oeKvo0E0N/xBE3AdmGoA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1657655870; bh=IiioFCTJVjJjhIygn2ZBqdTmcjLz4leAoJuVtgdQfQy=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=XvwyZwISFXfE170G+U12KE+WRqio3bvNPKbWeYzzrKooZmFYTTO4haY/dlZIrGGdH0+z+RQDd14uRU5wTzQQvI0Yt9/9LBnyLl4vPbZpUBMByfCsg+HUb6qDWpxt3ZjQa/3eqlLaTtX7MAYnO/egHngK44GzjFwIUS3jcpZ/Zwvl4Dpm4gjyTvBgcD36oatrbYgYk3dQtGYBOrIyMWwOBz6rrdZ2Qulm5+qisikGuBksp1Glx1plHzrVwYxAfzzlcckV3WcOQ3gmNJO0oTalVp1df4TrIPuG6X2C3aYeO7vIF6IibbA3W0+ZNXoLLHMcTVfvjGM0xIojVeF/F1YIGg== X-YMail-OSG: Gp6QV24VM1keOGlwbdklQrOy4xcanvYpcd4oO0yfIlFrKzTDqN6x4kI4wGVkqG0 DyRz9VE2ZpDXWWvD0_mET1e570_5.NsxDx6jB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NqhQw54S4ICop6__BAv9yrzFAFscU2qExaR VViEnHESDsg-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Tue, 12 Jul 2022 19:57:50 +0000 Received: by hermes--production-bf1-58957fb66f-c5dsp (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d650e0fd81500940b6eca43bb599a29c; Tue, 12 Jul 2022 19:57:47 +0000 (UTC) Message-ID: <008ff24c-d059-8d39-5e57-6f5e9de0dcbf@netscape.net> Date: Tue, 12 Jul 2022 15:57:45 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] x86/PAT: Report PAT on CPUs that support PAT without MTRR Content-Language: en-US To: Greg KH 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 References: <2885cdcaccffd287ef69c7509056ddf183a38a0e.1657647656.git.brchuckz.ref@aol.com> <2885cdcaccffd287ef69c7509056ddf183a38a0e.1657647656.git.brchuckz@aol.com> From: Chuck Zmudzinski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.20407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 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. Is 4.9.y the oldest version we are still supporting? Chuck