From patchwork Fri Jun 16 18:55:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793327 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 0B6BA60325 for ; Fri, 16 Jun 2017 18:57:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1EC42865B for ; Fri, 16 Jun 2017 18:57:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E555628672; Fri, 16 Jun 2017 18:57: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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 AC2712865B for ; Fri, 16 Jun 2017 18:57:51 +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 1dLwP0-0004J8-LH; Fri, 16 Jun 2017 18:55:26 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwOy-0004HI-Ki for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:55:24 +0000 Received: from [85.158.139.211] by server-9.bemta-5.messagelabs.com id 2E/40-01999-C9924495; Fri, 16 Jun 2017 18:55:24 +0000 X-Brightmail-Tracker: H4sIAAAAAAA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639321!67527681!1 X-Originating-IP: [104.47.36.48] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 63083 invoked from network); 16 Jun 2017 18:55:22 -0000 Received: from mail-sn1nam02on0048.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) (104.47.36.48) by server-12.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:55:22 -0000 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=4DOXkgUc1obxFJZSb6702sCTgp5HBw0fw+opWnQ/DBA=; b=TF2KvlYUo6meaesLUTHBztDfKCoxdQvMkLlme+djhhrTRaLZOxS+Rt2MBDnkeyW9T/8PDTcJE8PkcUlBIgu5Dsm0h+E0xq8r/cdGdb/SzroSGrqlTu4JXttExtSdTsn++EfuitCvCu+LCMwYUB9f3CApwFZSw7xmgGj1jD+MmJs= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Fri, 16 Jun 2017 18:55:13 +0000 From: Tom Lendacky To: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org Date: Fri, 16 Jun 2017 13:55:10 -0500 Message-ID: <20170616185510.18967.23512.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> References: <20170616184947.18967.84890.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR1001CA0019.namprd10.prod.outlook.com (10.174.84.32) To MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 00c2efa6-9350-4639-80e3-08d4b4e93b54 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 3:8F4Pw1KKifDW+st6F3fX3IsYev3NyyjcKbLuLJuMix29oOr3tSVQfqcjh6btJqoIZMk9VT/9jklDYqouaWwFTax1yCvv+RtsXG+VT3PUBgHA3WoQGYKTPuQ32aYehbSiFOHRAC1Hgu+DRiwwwxM3WfE2949SgAlJquRZSKypWL9xq9kEbIsqIR5R+tjgUssy60nk3k29zTYSj3LrLHJSJoIHyjdU7MvVYGn1hQM/6a/91L5zMfMSz3rOWbBghbRVayfT/vKtjC2nnWuoJ8d5DJEIwjLKPsevvHr4Sn9/XZ54ts7SXx0fAP0N2shw0BSkyiNbEuhgJQ+g/InjBRLlCYCB0k02IN81iGGu4FOjvcA=; 25:zgMukYDHMDFbt8p/N+YtLZliAkZzThSuoBkDk8ay2JP7D5XwWNvKNETstHtS36wXjpwNs3R1uLsUf3822PW+uguYOA0FtosnYzuzM2ogodR9lf/v/x6hTxCAr3l3x2e5DsSm9HlLS8vM45/1QsOQTKwsJ+S7DAhiLj18JxcmVk9J8nAAO4fZxcTjIWfh10N/lpU4cjpmkYuvVuZeABCMUdM+jIlxcp+yYz0Lq/pxLQe+F4BtpOE9MWyqqXPiisz1sXZKX7v1SypGGJ1VoRHPNDfGRd9JhA6o2va+PaJ8evmMejsAKZ2nVAc9DJiE7Kc/McJwApksRDZRB+wHrbNu+PqebzfS+GVmrS6pmIyxSvdDXNErV2xim4YJFmyF1unskL8zEvbQJ5SyKB4Fp0ZXB9Dr6JDTmkVBBHlJfx6Z9bKFjHrQLFCZ1gShUPnWtCvqyvExBAaXBa0jakOzB6YRHsFJWXgeeF+UlF2NR36owis= X-MS-TrafficTypeDiagnostic: MWHPR12MB1150: X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 31:y/BWCcwl/jHApniYxq5EdGpqnAur0ta9ASWwrrE0vKc/9ErXITxul/uaRwQYny5JSX4rOQmuYC1UKHM8eJZYL/b7wM2PGblWDm8h8N8TioWjkXg7SHAq5saC48KiTQvuoaD5i1lczHuOrkVfMpNxSMry6dYq/4iFCh7PiVG3h3KBnNYZmUyElzLolOqhYtnATI7zrOGwreED9UakygJfQyZf6kGlMA/nuRb70wrXZmk=; 20:tHuIHkKGwCcblXiS0zWk6rlGjuWV4kj3saKjNvXZpQw/s8Evd+iWyZQ0dP7v37La2ax+Sc4vI+lOodtiD+w7uav3VXAh6i33OyO+nUem8O8XAq5LmWlMBRKtlWN+gib+gvwhNzDJ7bR9g8wmAe57eFO0yJXc2qfxRNUsxEpjJm3h3AA2GeEsV28rJgIqunh8qjKpShswuDeAMyZQ4xFlDHVH3V4psawXa3oSSsr8ZYRa7YYo42xjlUYFEampuWYo5vN37oxcdMSYhMLDLVuSUiAmpplt3RofN16DQxqUOwijV2j+1tMqkS04bUkQIFw+oaIGri3pdfxovjNcqeMaU1U24JIywCTTzKCpwR2Ae6oqdWONl3bI2lcUW2VV4poDlPLsZuK1KOEEmdsxF9U9qz0E9YKgR1c5BEwYpGlDAA5iq1YmE1QwKrIZ2XNEJMZYoum148cdFvi8ZxjTEm8uJFyPsA+bBgS0o1ow32A6xsIQN9ADVX7Y/Cpr5VE16UgX X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1150; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzQ6aHo3TzZuSVlORVZXN2xyclk1Qm1ObjBNL3c2?= =?utf-8?B?NEpRaUw4UVZxVDJyckJha0pmVkRZRnM4QU5VL1ZGYUp0Rm11d3NPM3ZtQXlC?= =?utf-8?B?MCtvVHhzbCtOaGdpR2dpWTJ1TnB2VjBqejQ2UjAyZFZObUxoR1d4aUxZTU5l?= =?utf-8?B?akNmdWRWZ1lQZzMvOUVtc0dUK09QNllMbWs0bWRpcnBKZW02cHFFeExxOTNy?= =?utf-8?B?c0Q2Y3ZUcjlKN05SdThXNVd5cVpUMjR1SnlPZVpSME1SeWNXcVZyVVdOa3hz?= =?utf-8?B?K1RnWVhVVFlON05MUFdiUXlhVm90Kzg3cEhXTjAxNGUyWk1mYlRPTkd3MlFV?= =?utf-8?B?UFYxWmRHR043aWNRa2pHejVSRFU1T0MxZnVnVzN0Z2hZaDBnRnhnbU5FaDVy?= =?utf-8?B?KzVQekpPTFR1NTRYanJpemRKVDd5d1NNUE9XLzBYUEViVnpOdTdPc1IxOTUr?= =?utf-8?B?Zy8zRkphczRQMFBWY3BzaStMQXl4SUt5cTQzS2VvWVU4UG5DczZYWGNRaDNQ?= =?utf-8?B?eTYwZnpYNUJMdStISi9lelloRHYxVUdWSTNpaGgxU2wrajFHZ0JkUVNDbUN3?= =?utf-8?B?YUVVR1ZsU1hvRXlKOEMvR1B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Nit5VmYvZS9aOFlrMEVxK1pvYy9tdGMvQVVxQkxwNGE2RlVqdXRl?= =?utf-8?B?djdwQ1NFM093UDdtc2FvL1hMK1hyT210SXlKcXd0a2tRUXY4ck5UOUVJc3M5?= =?utf-8?Q?/n/jKV+vUHc82IafS6S?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39860400002)(39400400002)(39850400002)(33646002)(9686003)(5660300001)(54906002)(103116003)(4326008)(8676002)(7416002)(23676002)(83506001)(86362001)(81166006)(7406005)(50466002)(110136004)(305945005)(38730400002)(66066001)(6506006)(76176999)(47776003)(25786009)(72206003)(7736002)(53936002)(189998001)(478600001)(1076002)(2950100002)(42186005)(54356999)(4001350100001)(230700001)(55016002)(2906002)(3846002)(53416004)(6116002)(50986999)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1150; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzIzOnZaN0dPclVaM3JiVndncGdLR1RJRWEzQzRq?= =?utf-8?B?cll2MXYydkFkajd0U2UwWWl6aE9PU3BLdDk0cEFrQ2htN1VEajBnOG5QQ0V2?= =?utf-8?B?TG5zRitkNUVKWEs1UkxmMUlWYlZ0TG5wZUxtbWVydXdPcGlRaldaSmpGejlQ?= =?utf-8?B?RDRvOXdiY0pTY05ZTGV4bmdHUEloWW5ZR05CczRLdk5SMjhqMVV1Z2hrTlhV?= =?utf-8?B?ZDR5T1FPdnROeTlNbXd3bGZ6TUdHcG1oNGpVVGJNU2o3dlV0UExUcVlmZHhD?= =?utf-8?B?SmRGSW9iNkVySFhKdm5UREJ1SmlKVVhGb1ZGeVRmR0JFVFdreDJTdkpBNEl5?= =?utf-8?B?OFFBcGk4K0NMVkpSZU9mODB0S1dxQWJ4U2h3LytFR2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XayR1Kfh8Kqz7q0x30nQ44/8fX6BNJx/N44LJBfG68YY+yswheT5+Y+2As+NIeRcIVTpJB3XqavE++19/se9cFwg1THSLCsdQQR5oYNpBtiTkoox6zn1V+WFpsDCbzslHRkW7qEp4Rtc7spkJMX/9metUDyJI/E2An/rsosk+zsbAHWGIYFOMxn5X3NE+dzEpQ3Cqdex+2q7ICGydijIMZNgOrYH1gcjNST0+BG6f3G9SqwMbQI+XVP3KYcZkyNiHA5N7NaEn4UcOCq3veLleGWGNRkW49p1iiI//CStloBlr1bMBXINPix5YnLfnyEWe7nSChAJiXtOHlL4p54qeEZaIkSWudxJSjo/7R1Ck2pPrs7oCUUl3PNbLmmNif25Fjb9V6dlnbPvShmf5/qsTuDfuCjEVD3DEOLlEkqVWstLVZny8f6wEt8oSk0LzCtAU+grD14QQn9r62CRqcY4WxZVHZWiYgZE7/9eJ1OWjML7mCel3e3ePAcFjkiHjlgjDSpbFKr/QQxgNQHTd2hRexGrK4Y= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1150; 20:QawJ+K+3Ql6tTyS7v53Mj4mhCaRJ53hRUx8rL5HqtBGCwB92tflD5k1x1xHGeUpZ5qlF5J/pYPL4DlemKH5w7VPGYbZOIv/4xvoh9MhfD5HAtrswgLVHo9OdWbmtKem8P37IGkGIRkp2kiJ0MqskEwFDwkAVODmXtRaoTOnKStBdVUzLeNVoWe9GhlJxa52ubuNdGWz7HOqxELIfZeRubmld2E1MfdNJpJFyO5nklBFGzMv/0a0+dBjWId91fg1b X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:55:13.9590 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1150 Cc: Brijesh Singh , Toshimitsu Kani , "Michael S. Tsirkin" , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Boris Ostrovsky , Jonathan Corbet , Joerg Roedel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Larry Woodman , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , Juergen Gross , Paolo Bonzini Subject: [Xen-devel] [PATCH v7 28/36] x86, realmode: Check for memory encryption on the APs 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 Add support to check if memory encryption is active in the kernel and that it has been enabled on the AP. If memory encryption is active in the kernel but has not been enabled on the AP, then set the memory encryption bit (bit 23) of MSR_K8_SYSCFG to enable memory encryption on that AP and allow the AP to continue start up. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/include/asm/realmode.h | 12 ++++++++++++ arch/x86/realmode/init.c | 4 ++++ arch/x86/realmode/rm/trampoline_64.S | 24 ++++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/arch/x86/include/asm/realmode.h b/arch/x86/include/asm/realmode.h index 230e190..90d9152 100644 --- a/arch/x86/include/asm/realmode.h +++ b/arch/x86/include/asm/realmode.h @@ -1,6 +1,15 @@ #ifndef _ARCH_X86_REALMODE_H #define _ARCH_X86_REALMODE_H +/* + * Flag bit definitions for use with the flags field of the trampoline header + * in the CONFIG_X86_64 variant. + */ +#define TH_FLAGS_SME_ACTIVE_BIT 0 +#define TH_FLAGS_SME_ACTIVE BIT(TH_FLAGS_SME_ACTIVE_BIT) + +#ifndef __ASSEMBLY__ + #include #include @@ -38,6 +47,7 @@ struct trampoline_header { u64 start; u64 efer; u32 cr4; + u32 flags; #endif }; @@ -69,4 +79,6 @@ static inline size_t real_mode_size_needed(void) void set_real_mode_mem(phys_addr_t mem, size_t size); void reserve_real_mode(void); +#endif /* __ASSEMBLY__ */ + #endif /* _ARCH_X86_REALMODE_H */ diff --git a/arch/x86/realmode/init.c b/arch/x86/realmode/init.c index d6ddc7e..1f71980 100644 --- a/arch/x86/realmode/init.c +++ b/arch/x86/realmode/init.c @@ -108,6 +108,10 @@ static void __init setup_real_mode(void) trampoline_cr4_features = &trampoline_header->cr4; *trampoline_cr4_features = mmu_cr4_features; + trampoline_header->flags = 0; + if (sme_active()) + trampoline_header->flags |= TH_FLAGS_SME_ACTIVE; + trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd); trampoline_pgd[0] = trampoline_pgd_entry.pgd; trampoline_pgd[511] = init_top_pgt[511].pgd; diff --git a/arch/x86/realmode/rm/trampoline_64.S b/arch/x86/realmode/rm/trampoline_64.S index dac7b20..614fd70 100644 --- a/arch/x86/realmode/rm/trampoline_64.S +++ b/arch/x86/realmode/rm/trampoline_64.S @@ -30,6 +30,7 @@ #include #include #include +#include #include "realmode.h" .text @@ -92,6 +93,28 @@ ENTRY(startup_32) movl %edx, %fs movl %edx, %gs + /* + * Check for memory encryption support. This is a safety net in + * case BIOS hasn't done the necessary step of setting the bit in + * the MSR for this AP. If SME is active and we've gotten this far + * then it is safe for us to set the MSR bit and continue. If we + * don't we'll eventually crash trying to execute encrypted + * instructions. + */ + bt $TH_FLAGS_SME_ACTIVE_BIT, pa_tr_flags + jnc .Ldone + movl $MSR_K8_SYSCFG, %ecx + rdmsr + bts $MSR_K8_SYSCFG_MEM_ENCRYPT_BIT, %eax + jc .Ldone + + /* + * Memory encryption is enabled but the SME enable bit for this + * CPU has has not been set. It is safe to set it, so do so. + */ + wrmsr +.Ldone: + movl pa_tr_cr4, %eax movl %eax, %cr4 # Enable PAE mode @@ -147,6 +170,7 @@ GLOBAL(trampoline_header) tr_start: .space 8 GLOBAL(tr_efer) .space 8 GLOBAL(tr_cr4) .space 4 + GLOBAL(tr_flags) .space 4 END(trampoline_header) #include "trampoline_common.S"