From patchwork Sun Aug 14 20:37:33 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: 9280079 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 670E66086A for ; Sun, 14 Aug 2016 20:46:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 58FB1289A7 for ; Sun, 14 Aug 2016 20:46:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D70728A3B; Sun, 14 Aug 2016 20:46:39 +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 D7F62289A7 for ; Sun, 14 Aug 2016 20:46:38 +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 1bZ2GY-0008Nm-6T; Sun, 14 Aug 2016 20:44:18 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZ2GW-0008N8-Sz for xen-devel@lists.xenproject.org; Sun, 14 Aug 2016 20:44:16 +0000 Received: from [193.109.254.147] by server-2.bemta-6.messagelabs.com id 38/AA-13744-028D0B75; Sun, 14 Aug 2016 20:44:16 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeJIrShJLcpLzFFi42LpubySR1f+xoZ wg1d7VS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1owFXzuYC46LVeybPY25gbFFqIuRi0NIYBuj xP9r6xi7GDk42ARMJWb8V+li5OQQEVCQ2Nz7jBWkhlngKavEnwmbmEASwgI+ElMamthAbBYBV YmFJ24zgti8AlYSHxYdZQWxJQTkJC5t+8IMYnMKWEvMvNcK1isEVHP1cB9YXFRATGJz2y5WiF 5BiZMzn7CA3MAsoC6xfp7QBEbeWUgysxAyCxiZVjFqFKcWlaUW6RoZ6iUVZaZnlOQmZuboGhq Y6eWmFhcnpqfmJCYV6yXn525iBIYOAxDsYPyzLOAQoyQHk5Ior475unAhvqT8lMqMxOKM+KLS nNTiQ4wyHBxKErzO1zaECwkWpaanVqRl5gCDGCYtwcGjJMKbDZLmLS5IzC3OTIdInWJUlBLnD QFJCIAkMkrz4NpgkXOJUVZKmJcR6BAhnoLUotzMElT5V4ziHIxKwrzlIFN4MvNK4Ka/AlrMBL RYXxpscUkiQkqqgVHS7URjUdO6Am+vLu6r0y7EPJwyf40hxyajnoOGFRcmLchWlZlz3CNXbUa wgaPKzDlzv+zw1JkUuuFnYaiuULPV50vTJm74qxD6YGfEx2m5QsbXjnp+eMa2a1Xs94NxIWuu /Mt68vS031IVXxe7wL4HbJFzPn9VNTvwV0px8/yMeRlTF145E8ioxFKckWioxVxUnAgAmlSDU pcCAAA= X-Env-Sender: gregkh@linuxfoundation.org X-Msg-Ref: server-14.tower-27.messagelabs.com!1471207454!41356710!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 52602 invoked from network); 14 Aug 2016 20:44:15 -0000 Received: from mail.linuxfoundation.org (HELO mail.linuxfoundation.org) (140.211.169.12) by server-14.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Aug 2016 20:44:15 -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 21B458D4; Sun, 14 Aug 2016 20:44:13 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Date: Sun, 14 Aug 2016 22:37:33 +0200 Message-Id: <20160814202506.132428006@linuxfoundation.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160814202504.908694181@linuxfoundation.org> References: <20160814202504.908694181@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.6 29/56] 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.6-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 +