From patchwork Mon Jul 17 21:09:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9846299 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 1345F60392 for ; Mon, 17 Jul 2017 21:27:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48A1626E4A for ; Mon, 17 Jul 2017 21:27:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CEF3274D0; Mon, 17 Jul 2017 21:27:52 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC8DE26E4A for ; Mon, 17 Jul 2017 21:27:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751961AbdGQV1R (ORCPT ); Mon, 17 Jul 2017 17:27:17 -0400 Received: from mail-bn3nam01on0083.outbound.protection.outlook.com ([104.47.33.83]:8586 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751377AbdGQVK7 (ORCPT ); Mon, 17 Jul 2017 17:10:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Gny6FRKWk9bFoScL5MMvemzzpHUtSfmugDtscZCMY9w=; b=fmv3JANhaa8P0cr6CsZS7auiQAqtXUp/8nOiv4k0/QS/Y0+gebTighWOmZlqnBbGP3GoF3pFMlWn3sRw0oYNTI3+EyeMY5Tls7lG+hdiVueF5jf+OuQ3tyffkpdkgPVGNwwBsV2pVVkI3gm9mgoZ/dX8sv5WakCb/QZPEQSoyPQ= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=amd.com; Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1151.namprd12.prod.outlook.com (10.169.204.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Mon, 17 Jul 2017 21:10:51 +0000 From: Tom Lendacky To: x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org, kasan-dev@googlegroups.com Cc: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Arnd Bergmann , Jonathan Corbet , Matt Fleming , Konrad Rzeszutek Wilk , Andrey Ryabinin , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Paolo Bonzini , Alexander Potapenko , Thomas Gleixner , Dmitry Vyukov , Rik van Riel , Larry Woodman , Dave Young , Toshimitsu Kani , "Michael S. Tsirkin" , Brijesh Singh Subject: [PATCH v10 02/38] x86/mm/pat: Set write-protect cache mode for full PAT support Date: Mon, 17 Jul 2017 16:09:59 -0500 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR03CA0008.namprd03.prod.outlook.com (10.168.230.146) To MWHPR12MB1151.namprd12.prod.outlook.com (10.169.204.15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 45316206-c945-48d9-5a98-08d4cd584fef X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR12MB1151; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1151; 3:Y/hbGJHzQ3BvD3MRiK+qqp1yE36cX7hrqi+JUwWA6VFEC7JP054RLRupWg+M6oOnkRn9Vg0nvj5U45ZfHP5fFOVfNcSuIwE0PgagrsSq+eYBz3kQjtMv0FpGvngcmo5KP2+5HCpPg+WPeHoY580hpBTfu6rCw/aahb10N4qFjDPrOsbv2iE9xmYUr9Io2vCjZQKuHQaGdGDR9dI/R+xVMbzlZLcuak+GegAlVCUw+htcuesZZOCu4wPuk7Ev9JQnYKvEv4Eu3vq39s18IX3LDbiFmGJ2OtM064RbUSZuUPO9b7z6MB5T6hXb87EbwaZ2pOHqAEzvRx6ffnQwp9mb7OYFUmR72bXiAbbwRWWIxkcIvqlRVUArJLGNWkp2tnJGMPC5H0iF589IL8E2Yt5AlYPya8NZ9Tk4mFQxq+ewpa9PJKRNy5OQjRykVVTBldGegDZpR5PD/ApeY6oA7rJ1QWJ67/atMizz9G5zNcXyX5MNJRTqkRdTMREln3dupkTwMxjJm9ROHlUQll0cF158F6eoSYOk8SpZsik1jQ+88A3kPFnCE2ZQfrp3EeOrOyZMjfhL+pVxTclXFBOuO6fUU9BIGLHkI4w7CoTeQyp+YrNCBkkxWA5OszOjhcBvgS29nG0zCOZy2gBDvGs0sxA7fjg5rhhTs7HszkncdGbKp2o7EhD+WJv7liWSgREID7P6kk3ff4XTEaezJhh1JxT6nO+rsn4hrIV/mvdoeKzGPB5stXP9NE7PhG73iXqUxWCLfH+d+MaIuKs6IjODNFWoBQ== X-MS-TrafficTypeDiagnostic: MWHPR12MB1151: X-Microsoft-Exchange-Diagnostics: 1;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isDvh69ZieG9jKDYMSL58zH/3w/zK26bQENl9OdVMOQOIBoSTAA1WE4IT+h95B90S+NHR X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1151; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1151; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1151; 4:vqRkQjcaTzpV9Hhp10jt2CNnzJiNmavGNKCSyG4zh8?= =?us-ascii?Q?O8vi+4sFXHQv2k7xqunEOdKhuuP2pWAKJahUrXrcjYywQ5pTjA1ZLEYMkHFg?= =?us-ascii?Q?7wtnmAI1cdIrNisWvI3ktyhzRERguWC2wlCosgm01lM2MpSLqovB8Cf1Q6Zr?= =?us-ascii?Q?e7rkOvK6xAy7DFUKBZHs5wNtLarBpdPpcY2FveoS7HDdizD9kINLUR2cObbF?= =?us-ascii?Q?Tus+9cm/an1538bWicI938omJjTzMeaDWPJKuW5uFpkEzLZn5ATiYxXZviXx?= =?us-ascii?Q?nGqqZX0qBzC9cru+1j0SlulKnJQNNKw478yzQ65GHUQFXdx4vESxuwg8Kq1S?= =?us-ascii?Q?wXOI361kr7FWgjJbylW2BaJbe6J4C+cKCwHNbQ0kNkY1uLr4DzBivQxv8LLD?= =?us-ascii?Q?MoMcEkjAWpG7vSHjh6JkPuNRQ34OP9qFxs4pcVqKb30hXU4TMHt1HeMFj4IK?= =?us-ascii?Q?NQBogAb/F7D75aQH49tzUt+sOgsffwM84017w2ntIETdGan843uj0DPyasez?= =?us-ascii?Q?ZwYUz+LcT0G8nwuwv+W3fbLBY3JNZawHpEEhLBdf0Ak32efCXEqnyNurJWlb?= =?us-ascii?Q?I1A2Ynu8eQWTXWlewl6OgHLTTgf8ocDwGstIFVGT63JZycXbNf09snPjR/Yg?= =?us-ascii?Q?4pKDb9GJblpu7LqVwMlpCDOfTqEuSsdhcSGUReR0D/aqreiNnlBHtI5ZFH5d?= =?us-ascii?Q?ig0ua0PWJ0W7hil8dlEhX4nD8GPPfxGqlkYgh64C0Ul3YaSBv/ziEPtCDBoc?= =?us-ascii?Q?/hjJdvotVe0M5L3P3TFbF4gBe6lnSBq02i16eUVzvRnDJWboowMiGHKbe44X?= =?us-ascii?Q?92ruYaqSGpsM8CFGUz0Te7kcFurKdf9p5MxugDFPC0PAf0xlDBwArJeLDleB?= =?us-ascii?Q?HHRh1Z8wktlp6aCVfpAjH5JsL5zYINpv2bYPz9os/wPYoiXqcLZZfpR6vFLF?= =?us-ascii?Q?N2J577ez6JL0kUuRCnOt8d/QhcoKy8NNMmpm7i0wyuknyRLWNtFWHTX7s1PH?= =?us-ascii?Q?1GlAw2DZJwkgzm3s0rDpwWvPgcodjWACCplIlck0jox1rkfCdf3LclEWOZSz?= =?us-ascii?Q?z/ZPQQjLAe+2nqc4EDb8F0r5fflavVHA12HepQx69YVywKSulm22UgpSxprQ?= =?us-ascii?Q?iX8OxMsUgOm/SH+/mwFVkzJt1gMlhehs39DWVlpxag3xKUw5XNqHmRpdoBPG?= =?us-ascii?Q?XYMotF9suOGTMA021BklMbxBrRsjbhelFpxMGhU9cTZ7+IJqihUmhTdPZM6d?= =?us-ascii?Q?IIhh8bL9ZPPQ9TOoVJHLcvX0hl33a3sK9xxKmG5+LiiHZPWVW9dai4oobB4T?= =?us-ascii?Q?8XYIBQn5xoLnLwDt46DEk=3D?= X-Forefront-PRVS: 0371762FE7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39410400002)(39850400002)(39840400002)(39860400002)(39400400002)(39450400003)(25786009)(6506006)(33646002)(54906002)(7416002)(76176999)(478600001)(8676002)(50986999)(6486002)(47776003)(5660300001)(189998001)(42186005)(38730400002)(305945005)(72206003)(53416004)(66066001)(50466002)(48376002)(110136004)(118296001)(2950100002)(81166006)(5003940100001)(3846002)(36756003)(53936002)(7350300001)(6512007)(2906002)(7736002)(6116002)(86362001)(4326008)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1151; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1151; 23:mH5le0PyTbbih+PhiV1hzvHLZPg/g3jlq4qolklYv?= =?us-ascii?Q?YXm0xuul7g7JTY4kyF0k0ouof+vCQjjq7BS0vkE62QYk7RKdOPaCGb+LuR9c?= =?us-ascii?Q?P90+9LxFAqiGk1BDVBlQ4nlgYz3rSKDILnVOLG8izdqCTfwYC2TOYWokuj+V?= =?us-ascii?Q?5j06+xdj/lzDpI6TwHYXunPSzhtlXfkVzW4NXu0KVN9Wo5noqyxAHnpyk7/6?= =?us-ascii?Q?BHvXbZdUXfv+BnFCeEizFHatUvbgItAUZUhHCkslugtZr46UGJcX2CpZ6Hn6?= =?us-ascii?Q?lkTcc21Wnvik1L/3hq3CjWM9s3fp4SKEzmX53c95QsEe6g0hiDh7zZr97aAx?= =?us-ascii?Q?ujG/+bw/ApfN9tum/fMMx+1jwyeldwU40Obg+57fQjJfMRVH8oKwOkBYPv3d?= =?us-ascii?Q?pHGUcnzSXUVCKO/6sP0FU4WYEknz6T8r+QnyJXPwZv9m6MF3587t6jEMOSX6?= =?us-ascii?Q?LUoRE5QAHXLHWGgnkTPxL9OIRN+ZVSvnAs3Xq6bg0x60PboJAw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FcMYqVgEpCR3b4E8RCaLC?= =?us-ascii?Q?8LC8FamdLuwSWJDCPlX5Gei18Dv7zJBUMmxGoOgXtanTAtozIP+p7dVIxXpI?= =?us-ascii?Q?lqx/omYoqiwrJuKwqs41nTTLzG39rR4cH9Y+1/7n1+bGi1eX9PaRCT/VHtqT?= =?us-ascii?Q?yKV0r1Fh8RUbQiJfrpWH/luossDtySltq1aFfA8TdXEMenXsva2GK6ywN1k4?= =?us-ascii?Q?ArtzOAfPaqDSco111JEWH3MO84whUgYQije2gXimM42Sp2E5tRDHbdg+U3YG?= =?us-ascii?Q?u4NMOhxzHDHZuA2t936xsLLWgm1ctGRbqhLYYOFJp8XE4SxhJB4JuAII48J4?= =?us-ascii?Q?q2yscAQyAMEEyOBMJINSEVeazZUXj37c6nKnBMMF/v6AM542LlucEJSo/Di2?= =?us-ascii?Q?njJH8SlJSCEBu93OHchcSexzmlL9KrI29O00era6VFgAdOXUKC6Xa+e8Fb2z?= =?us-ascii?Q?vujDlcSWgkE03EiGT3zPQBBHFMyRA7t7OOYSrsnyhi2Es9AHkRX+O///ElaX?= =?us-ascii?Q?mQ/gD5+dPsXMLs4LclOlxmdfvLX7CU2uF3ou+rl5ncXg/7IstQF6i90Jh78q?= =?us-ascii?Q?03iilZqjmPKNe23why0qO/qL9JJ3ou/lYUaUOrniGHO4dW8ok/BWknarHjd8?= =?us-ascii?Q?T25KfkZCgOGpo7qo4AzsHzPhHnMjnjF11fjocwzN9xhCX/ApvcYHMHpefXww?= =?us-ascii?Q?3j8PupA2Kh8ww6I6TgKEEbj7P0pPUwBzt1Wu/BM6Z3nPQ3r78mYZZz+1hHZq?= =?us-ascii?Q?buKVY58TwiQV5ZEFMVcpKVjA7ywetea2O+COilj/PDok3uO2sPDEJNqG0jRc?= =?us-ascii?Q?+xH94HfWnPt0g21hImCJlJQiBTAJdOi8JrBsNSKKKyAfsWCbHphNXEQCb5Ah?= =?us-ascii?Q?Hgmbkydym9IiGEcmdOzmcl?= X-Microso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j7TSNlCsk6OQgEksNCdH78UHpEp/IGL4ZjiA9fQNquvqNkbvc24Gp44EX8+owQO7N0/wDpOL/V88JxQvtdgWNmMAcWo7bsvvNWkh4l4XcUaWdj/uBTeFUMaZP5yAcyT5saS4OXVeKfTXrp0SuOHI6ps4DQkkMU+IiEO7QOy/uf+Hk4vJxFaZBN1keryrI6sx1x1ZkFbHOhsRrtJe4TUA645/X+CSs2/1WHXtkErDdjktns7tzjaQhF+lcddWe+0COH3aS85Or0Iq/jpf8DKbluQyEzk5REbJFWZzAjkAxiyvPK1ZGARHDtXpmZE+n5B6Z4DzH7lrV3KhU9DNGUmDk62F4s7Mkc1LiDfG1TvZXuwZejX/z8A4Dp3WibSN24Gx7h/UHtZn+JOaXCZu8w2aZWz6r1/D+2MwBBgZ/mBK+0MwpMj0uWhvfURYOArUyRZTjP7hGne9j+vhVdEZiE= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1151; 20:rlYCpiIFCJRx3VaUxBp+6YdjGkFK/dDzE7gFQnY8ge/9XTYQFJPsTsA6JyMfBUOTzwcAcvwk4afpGsfzBkKNtMGntulChC4X1MxG6WWju9hjeG6was8I9PZsOCdFS8+iakvQlfYFE9EDmhufH6T0KJmfNYRlZanxh9zclU0RwgSt1XsD1QNHLCGV7gD654BwJalERn/DalEywojE+1loP3ksN71GjiT6cW3M83aaamtz1mUTmzKerFGPRFbKE5io X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2017 21:10:51.3406 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1151 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For processors that support PAT, set the write-protect cache mode (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). Acked-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/mm/pat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 4597950..88990ab 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -293,7 +293,7 @@ void init_cache_modes(void) * pat_init - Initialize PAT MSR and PAT table * * This function initializes PAT MSR and PAT table with an OS-defined value - * to enable additional cache attributes, WC and WT. + * to enable additional cache attributes, WC, WT and WP. * * This function must be called on all CPUs using the specific sequence of * operations defined in Intel SDM. mtrr_rendezvous_handler() provides this @@ -352,7 +352,7 @@ void pat_init(void) * 010 2 UC-: _PAGE_CACHE_MODE_UC_MINUS * 011 3 UC : _PAGE_CACHE_MODE_UC * 100 4 WB : Reserved - * 101 5 WC : Reserved + * 101 5 WP : _PAGE_CACHE_MODE_WP * 110 6 UC-: Reserved * 111 7 WT : _PAGE_CACHE_MODE_WT * @@ -360,7 +360,7 @@ void pat_init(void) * corresponding types in the presence of PAT errata. */ pat = PAT(0, WB) | PAT(1, WC) | PAT(2, UC_MINUS) | PAT(3, UC) | - PAT(4, WB) | PAT(5, WC) | PAT(6, UC_MINUS) | PAT(7, WT); + PAT(4, WB) | PAT(5, WP) | PAT(6, UC_MINUS) | PAT(7, WT); } if (!boot_cpu_done) {