Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4689242imw; Tue, 12 Jul 2022 12:28:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tGq+m7KC4E6VmluDeiZfjtIOryhRzB8HdCkpwbNNpdKZ/ev7NAGKLl3JlccEIOkgylkzld X-Received: by 2002:a65:58cb:0:b0:415:ea6a:c535 with SMTP id e11-20020a6558cb000000b00415ea6ac535mr13514215pgu.100.1657654103470; Tue, 12 Jul 2022 12:28:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657654103; cv=none; d=google.com; s=arc-20160816; b=fIHHtAF4UAFGkVeXmqBUMTdZmP6t6Udjwm7WGyrrIPcceed1VsupC+prkVWTgXjC2G CTf/RxwSRT3s3h/EFNebU62OtF7in3OqZL1pI6DxRSNiCTS4m/Hek7GnYa5dQbrf7wDj 5EBolObJ9iZEjINfmWu13DnlsmNompVV9fJRav2vBXsRQHl1VgnjhB+8MqryT2XI4hfH d5qbNZY9S9l3vgrux8S7gNPh/vlhga20b5bDOD/XPDcumFo6GVmN6IZcnadid/CgFz6I 4sR/JMCbRAcxnx/nxaD4Kv4Zdzu+BesB8tgy33IrflIMOvZ/vFqEGF11W08MytQznT60 MLZA== 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=NG5cXn3vln3thr4UoY8Y79gpkPfm3qjMO+kEJjm4RvQ=; b=mSyIDjdSsV1eD+sN17p9OdryX69MwTxEUdv2CU0UeyMORwG1cK/l0gtO/dSv0jyMeB bHsV8edm7+ghqMb9TexK3flxPJeE+Jmx4ltgfU7qLi4m62DPS027IsVByT4/vpCLw/Dh +nvUql6VLuVfm96iOAEc/ey0pC2opQeyS3UyYpDNFaTnWmeXbZ+mzTGg+nimsfwz0X9G gSWe9kRBKqLTx6DvmiWj/jJ4ocTe5P/1EUdJkU1Fuo3k/K4oemXTbwOyc0l8p1C2BueD v/43p2mMhRH6fHboF0eiLhJldOi1DgpvHMQ2cyjSdqce8aMMtu27xntyg4/Bv99iwtWM o9PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=C0vW8IXu; 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 e20-20020a170902f11400b00163937195e7si12902873plb.372.2022.07.12.12.28.11; Tue, 12 Jul 2022 12:28:23 -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=C0vW8IXu; 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 S230296AbiGLSgh (ORCPT + 99 others); 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> 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 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