From patchwork Mon Nov 6 04:53:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yan Zhao X-Patchwork-Id: 161824 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2452760vqu; Sun, 5 Nov 2023 21:24:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEnn6SdgOv/Paa9xkR3wIe76+ABliMZUu/F+aGzcLkM+Gwk9FeZnynyMziuEKA4fl9NMCE9 X-Received: by 2002:a05:6808:440b:b0:3b5:7044:37f with SMTP id eo11-20020a056808440b00b003b57044037fmr18407582oib.17.1699248245797; Sun, 05 Nov 2023 21:24:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699248245; cv=none; d=google.com; s=arc-20160816; b=bCb2fGtbaCVJRRf+QQGmiFVDjmfUDVrNoeVdGwAOdsfPJXzUP6qGOLAoEutaUpt2T/ I5AQLtbTvZsFjQRBjPw7HrlfsbmIjjv1TuYogNkMcpl8J30rgEbmLDn07vtjCKPQI/va v8mJahRq9GZVSoz/P5uYtpz1KaHJtAHiB8cu+vBiJoHG0uDX7a1hXaplPdKJc7/81B15 fpe6s/QCXDCcwFVjhJtsfBqljTXdwZLLqQS9tjPlID8HwhsnqpdNQ3kWKQ8rzkJrEBMf n7xuRtKC4C59Hz0MW96+tBwJlbyNJHnxX/KOnaFKIKhZzNus1joiUHlR20SD+sEE65yZ oC2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=5JbCh4Dc6y2jyz/k+dXoJmBJgNOBSfvSw38uWfNc+ac=; fh=IGcO485QYWovFMRUbAzDpvFs7nXT82ukaLUHyUbJCug=; b=QMxEm1+L4KS6q6M2tAOnwR7URoOwx0ldSQe/BBpo5q9QWfadN2GEJT/IWn42Jcs9bM M+RFBBCThUO86g8DLO+YCi+AOKxwQo0IFzQstgWtvNK2AK3/QM1JZC9z0e4PHP6QHHzd p1JkYJJhYcQF88ZjSSxWXxVS7UxUImPRDlRxIqTC0mfNSiGN25qsLu4iAFsjbmjLHxGI 8X8gSc/n4MuhHAYbR3iSHDy63bG5w2hzWTNYG4KSrqCeqXwtcX7vBLStaoLwyMQ9GKiE klBDAjqluhDxF83JB0gUkGGzRDQQwBjJH4BNbNDEgak6OGi4+qY01LczLyQpKOgOG1I7 QTsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LROM2r5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id fj13-20020a056a003a0d00b006b2562dbd24si7647958pfb.220.2023.11.05.21.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 21:24:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LROM2r5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 91DC1802FB84; Sun, 5 Nov 2023 21:24:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbjKFFYA (ORCPT + 34 others); Mon, 6 Nov 2023 00:24:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbjKFFX7 (ORCPT ); Mon, 6 Nov 2023 00:23:59 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5DACF5; Sun, 5 Nov 2023 21:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699248236; x=1730784236; h=from:to:cc:subject:date:message-id; bh=fdAGOdpA2R6+OC+nPs2Nw5XTCnL/xZ9metm1cqBG68U=; b=LROM2r5hg0zRVCKLQVgOopDWATD+X4r37hAM+M19ei0Nou65qmuXvGVa fjAOVw1s38pqcybjDGYjXZsv9lLYGn9mFeRXsHXGAlWSzTJYbt85v27pn 7OVzR1SUrGMUx2IAl/XVWExXOjh2qz2EVaascZFsN3LABlzbszjAEteBI gD1uU1PPi54tW0nvK3ebcZEWqKGh8/rsV0Lb9BJV/e4nbOEMtVQQD+0Ns 8Vkp1RO8l2k80okyLjlmX3xD7phHITpn5qzbgCQ/K56Q5/t6/eG8OGtGh /yJJgk6mH6BmnkuXsO7dK7q0t/Ij1+oGSa+orrbP51X+ylkwCa/mhRVFx w==; X-IronPort-AV: E=McAfee;i="6600,9927,10885"; a="455692972" X-IronPort-AV: E=Sophos;i="6.03,280,1694761200"; d="scan'208";a="455692972" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2023 21:23:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,280,1694761200"; d="scan'208";a="10340714" Received: from yzhao56-desk.sh.intel.com ([10.239.159.62]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2023 21:23:53 -0800 From: Yan Zhao To: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org Cc: dave.hansen@linux.intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, corbet@lwn.net, mcgrof@suse.com, andriy.shevchenko@intel.com, kai.huang@intel.com, Yan Zhao , Sean Christopherson Subject: [PATCH] Documentation: x86: Correct effective memory type for MTRR=WC and PAT=UC- Date: Mon, 6 Nov 2023 12:53:56 +0800 Message-Id: <20231106045356.5856-1-yan.y.zhao@intel.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 05 Nov 2023 21:24:04 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781790928383967329 X-GMAIL-MSGID: 1781790928383967329 Correct effective memory type for a WC MTRR on a region with a PAT entry UC- from UC to WC. As per Intel SDM section "Selecting Memory Types for Pentium III and More Recent Processor Families", table "Effective Page-Level Memory Types for Pentium III and More Recent Processor Families", ================ =============== ===================== MTRR Memory Type PAT Entry Value Effective Memory Type ================ =============== ===================== WC UC- WC the effect of a WC MTRR on a region with a PAT entry UC- will be WC. There's a previous attempt to fix this issue at [1], but not sure why the patch got lost. Fixes: 2f9e897353fc ("x86/mm/mtrr, pat: Document Write Combining MTRR type effects on PAT / non-PAT pages"). Link: https://lore.kernel.org/all/1457131501-14855-1-git-send-email-mcgrof@kernel.org [1] Cc: Sean Christopherson Reviewed-by: Kai Huang Signed-off-by: Yan Zhao --- Documentation/arch/x86/pat.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 1aabbc532413ced293952f8e149ad0a607d6e470 diff --git a/Documentation/arch/x86/pat.rst b/Documentation/arch/x86/pat.rst index 5d901771016d..414129efa316 100644 --- a/Documentation/arch/x86/pat.rst +++ b/Documentation/arch/x86/pat.rst @@ -138,19 +138,19 @@ otherwise not be effective. ==== ======= === ========================= ===================== MTRR Non-PAT PAT Linux ioremap value Effective memory type ==== ======= === ========================= ===================== PAT Non-PAT | PAT |PCD | ||PWT | ||| | WC 000 WB _PAGE_CACHE_MODE_WB WC | WC WC 001 WC _PAGE_CACHE_MODE_WC WC* | WC - WC 010 UC- _PAGE_CACHE_MODE_UC_MINUS WC* | UC + WC 010 UC- _PAGE_CACHE_MODE_UC_MINUS WC* | WC WC 011 UC _PAGE_CACHE_MODE_UC UC | UC ==== ======= === ========================= ===================== (*) denotes implementation defined and is discouraged .. note:: -- in the above table mean "Not suggested usage for the API". Some of the --'s are strictly enforced by the kernel. Some others are not really enforced today, but may be enforced in future.