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 5A5B9C43334 for ; Tue, 12 Jul 2022 18:36:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232880AbiGLSgh (ORCPT ); Tue, 12 Jul 2022 14:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229933AbiGLSgf (ORCPT ); Tue, 12 Jul 2022 14:36:35 -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 8D8AFBDBB4; Tue, 12 Jul 2022 11:36: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 27F3B61578; Tue, 12 Jul 2022 18:36:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C44CC3411C; Tue, 12 Jul 2022 18:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657650993; bh=nAOi1MXsyoVA0q9gtRNUyy6hltF+AMdxpRWiXfWBYeE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C0vW8IXumz/ivLT3cERCSGYAWs6tdTRL1wCt9BWjxzmdxi1SLyExGyUVx+/BrYGW7 3CVGWTBENx5dyBMuX+ieXSL+TOud9FcNOdGHmaJJ3paXHZ7ugefk9DeDyQDecm/odG bN9CdSEj/FjZs1q7+EcHAjdilv39IfeOFUFGswE4= Date: Tue, 12 Jul 2022 20:36:30 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2885cdcaccffd287ef69c7509056ddf183a38a0e.1657647656.git.brchuckz@aol.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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