From patchwork Sun Aug 14 20:23:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 9279925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C92260839 for ; Sun, 14 Aug 2016 20:28:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DE5C289F3 for ; Sun, 14 Aug 2016 20:28:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 726AB28A1A; Sun, 14 Aug 2016 20:28:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 038AE289F3 for ; Sun, 14 Aug 2016 20:28:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZ1zB-0006Lx-UT; Sun, 14 Aug 2016 20:26:21 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZ1zB-0006LS-6e for xen-devel@lists.xenproject.org; Sun, 14 Aug 2016 20:26:21 +0000 Received: from [85.158.139.211] by server-3.bemta-5.messagelabs.com id DC/9B-01957-CE3D0B75; Sun, 14 Aug 2016 20:26:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmkeJIrShJLcpLzFFi42LpubySR/fN5Q3 hBj2fmS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozL85+wFxwXq7jZNoWtgbFFqIuRi0NIYBuj xOs5i5m6GDk42ARMJWb8V+li5OQQEVCQ2Nz7jBWkhlngKavEnwmbmEASwgI+ElMPLWQFqWcRU JW4vFsIJMwrYCVxbekFZhBbQkBO4tK2L2A2p4C1ROevNWCtQkA1p6e3sILYogJiEpvbdrFC9A pKnJz5hAVkJLOAusT6eUITGHlnIcnMQsgsYGRaxahRnFpUllqka2Shl1SUmZ5RkpuYmaNraGC ql5taXJyYnpqTmFSsl5yfu4kRGDj1DAyMOxj7VvkdYpTkYFIS5dUxXxcuxJeUn1KZkVicEV9U mpNafIhRhoNDSYL356UN4UKCRanpqRVpmTnAEIZJS3DwKInwqgLDWIi3uCAxtzgzHSJ1ilFRS px3LkifAEgiozQPrg0WN5cYZaWEeRkZGBiEeApSi3IzS1DlXzGKczAqCfPuBpnCk5lXAjf9Fd BiJqDF+tJgi0sSEVJSDYzu874GCCgeeSbwznXJROu1DH5Zlh9qHULU7oY/zH336XnU8Tn9Sz4 H5Ih65NZ42NzZJuVt0crlw5vru/Hcmih3+Yy/Yre+iG1RV0vatcvv/lIVqTU6GzpZFrPW7006 v/lfX/sG38L2yct+e3wXffN1g+6mUueLLt2nfr/Jtpmx7+jcGTurfq5VYinOSDTUYi4qTgQAr qZeUZYCAAA= X-Env-Sender: gregkh@linuxfoundation.org X-Msg-Ref: server-16.tower-206.messagelabs.com!1471206378!38545069!1 X-Originating-IP: [140.211.169.12] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10080 invoked from network); 14 Aug 2016 20:26:19 -0000 Received: from mail.linuxfoundation.org (HELO mail.linuxfoundation.org) (140.211.169.12) by server-16.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Aug 2016 20:26:19 -0000 Received: from localhost (pes75-3-78-192-101-3.fbxo.proxad.net [78.192.101.3]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7FCED725; Sun, 14 Aug 2016 20:26:17 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Date: Sun, 14 Aug 2016 22:23:29 +0200 Message-Id: <20160814202304.101464875@linuxfoundation.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160814202302.493206349@linuxfoundation.org> References: <20160814202302.493206349@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Cc: Juergen Gross , Denys Vlasenko , xen-devel@lists.xenproject.org, Toshi Kani , Peter Zijlstra , Greg Kroah-Hartman , "Luis R. Rodriguez" , "H. Peter Anvin" , stable@vger.kernel.org, Andy Lutomirski , paul.gortmaker@windriver.com, Ingo Molnar , Borislav Petkov , Brian Gerst , Toshi Kani , Andrew Morton , Borislav Petkov , Linus Torvalds , Thomas Gleixner , elliott@hpe.com Subject: [Xen-devel] [PATCH 4.4 29/49] x86/pat: Document the PAT initialization sequence X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Toshi Kani commit b6350c21cfe8aa9d65e189509a23c0ea4b8362c2 upstream. Update PAT documentation to describe how PAT is initialized under various configurations. Signed-off-by: Toshi Kani Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Toshi Kani Cc: elliott@hpe.com Cc: konrad.wilk@oracle.com Cc: paul.gortmaker@windriver.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1458769323-24491-8-git-send-email-toshi.kani@hpe.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- Documentation/x86/pat.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) --- a/Documentation/x86/pat.txt +++ b/Documentation/x86/pat.txt @@ -196,3 +196,35 @@ Another, more verbose way of getting PAT "debugpat" boot parameter. With this parameter, various debug messages are printed to dmesg log. +PAT Initialization +------------------ + +The following table describes how PAT is initialized under various +configurations. The PAT MSR must be updated by Linux in order to support WC +and WT attributes. Otherwise, the PAT MSR has the value programmed in it +by the firmware. Note, Xen enables WC attribute in the PAT MSR for guests. + + MTRR PAT Call Sequence PAT State PAT MSR + ========================================================= + E E MTRR -> PAT init Enabled OS + E D MTRR -> PAT init Disabled - + D E MTRR -> PAT disable Disabled BIOS + D D MTRR -> PAT disable Disabled - + - np/E PAT -> PAT disable Disabled BIOS + - np/D PAT -> PAT disable Disabled - + E !P/E MTRR -> PAT init Disabled BIOS + D !P/E MTRR -> PAT disable Disabled BIOS + !M !P/E MTRR stub -> PAT disable Disabled BIOS + + Legend + ------------------------------------------------ + E Feature enabled in CPU + D Feature disabled/unsupported in CPU + np "nopat" boot option specified + !P CONFIG_X86_PAT option unset + !M CONFIG_MTRR option unset + Enabled PAT state set to enabled + Disabled PAT state set to disabled + OS PAT initializes PAT MSR with OS setting + BIOS PAT keeps PAT MSR with BIOS setting +