From patchwork Tue Jun 27 14:58:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812193 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 C9B1A60351 for ; Tue, 27 Jun 2017 15:01:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD422286B1 for ; Tue, 27 Jun 2017 15:01:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1C59286CD; Tue, 27 Jun 2017 15:01:08 +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 62CBA286BE for ; Tue, 27 Jun 2017 15:01:07 +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 1dPrws-0003Si-Iw; Tue, 27 Jun 2017 14:58:38 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPrwq-0003RQ-Le for xen-devel@lists.xen.org; Tue, 27 Jun 2017 14:58:36 +0000 Received: from [85.158.137.68] by server-6.bemta-3.messagelabs.com id 95/B2-02181-B9272595; Tue, 27 Jun 2017 14:58:35 +0000 X-Brightmail-Tracker: H4sIAAA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.messagelabs.com!1498575513!69065042!1 X-Originating-IP: [104.47.41.58] 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 33803 invoked from network); 27 Jun 2017 14:58:34 -0000 Received: from mail-dm3nam03on0058.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) (104.47.41.58) by server-6.tower-31.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 14:58:34 -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=ZdBosiV9qxJe2azi1DD6Jmr4pVvxbVFcw8/JCFkNaE0=; b=4mRr1qU6i9oWwCyt5D0kBJkJOqTSx696sCarEcEH2ag+TIHh2P14nRRoMwTwmNldoKERSyEqDAw8fn9BDvPXqOhvTETj9IoKuZfuHKd95l4f2v/j5sCGz8cIkEQarTirxug5RJtBZidERYAmvdeokDRcECWfZR0M20MEXOj7mVg= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by DM5PR12MB1146.namprd12.prod.outlook.com (10.168.236.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 27 Jun 2017 14:58:25 +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: Tue, 27 Jun 2017 09:58:23 -0500 Message-ID: <20170627145823.15908.76242.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627145607.15908.26571.stgit@tlendack-t1.amdoffice.net> References: <20170627145607.15908.26571.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: MWHPR2201CA0057.namprd22.prod.outlook.com (10.172.59.31) To DM5PR12MB1146.namprd12.prod.outlook.com (10.168.236.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18a206c7-e84c-46d1-d50c-08d4bd6cf8a9 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)(300000506067)(300135500095); SRVR:DM5PR12MB1146; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1146; 3:sPlVmvkmxiTdC1olxfSyeo1KgW1HbGKy7Kl9W1Ko161XzOVGzaqKT73nhh3hc4Q0zGO4rUyhZSUw9zVQ11hLzL7i30TzhtghFItXpKIYhilT+LKCzvx7sq9QyDlnE9o5q/BIrHgD6cfaJfh6d+FJlid6NfdYRCXkyqiU9wj/4N/z6eHfDZcABqFXRlT/WUCPFCa/4tYxtqOHgo9q0yTLmPD1C+iTAc5hDBClPOAOnXRIHcAlfI3Za+ic19aGgjwyb1SwosbLgoOyTPtW3NG0KqTymgKFc6Fwq1343thZYRsZEHFbhpVjTedy+D9uxJtcBOGMHBeALK/gO6YzUmtA9gZQIcz/94jjmt8pXdEgSCeQ/jUBhX8fOR2E2z6OnfndPOig+pwKlnAe9NwcIsfalOUc4Fn5jhElb4cXJ2TbeVruBzf7nh5lTh8Loll8K8EYjqakDbkWZmVPy9jrbFcriMV+XFtDcoOeChH2Db8Cpgzcqk1u/+ty0Ihd4SiznVmEsL5+3WZjg+jSqM05Cd/KzKeHCq0PyV0NrZ7VbMAcifX89O7GVHHcXQUhYviqPs905cahNmVspukMozkUgfk8LVP1azM0dOlcKT/2jvzVYMSbkU56mPLH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OwXtZDs1S5aRniWiOttC7bB5vPPPGY7dXObwbMwMsyJP7dfiwe5FUYLJzpQF6vb09ekYBPn23hMYdOSaITToVSxqEmzUCyoP5LHAwjXBx2ZK+O3FEE2Ukr1fMyGQn9ga5mTm58q4xZaooPBxdZdw/7wJKv6MCm/24P41yqfVXW9t+rjRK0BhQ6QJtYSIZaQQMwgxVO6G9lleByUQ1jIW+KTQGlmZqKZP/wsCLBmaRFSJF3HdRwDAfcXXno5ZmI9ij176CaXKjWCM3ubN0QV7WXhK0VpxALzgCU+pPpgEs/O X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR12MB1146; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR12MB1146; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ2OzQ6LzQwVk1aanQwTkszbHR2bWRLeVNMNDQrRzN6?= =?utf-8?B?L1d4NWFNNEhVRkhKTHR0M1BKY3FTaUZnSWZHYlJsMjk3NFM2ZVdRdm4zdEpZ?= =?utf-8?B?Yjd1V3pQblkvc0pMbFpVSHo2ZllyMG1VSk56N0N3NHhRQVJSbTFWejdEWkFH?= =?utf-8?B?TmlJRzF6ZkZQMmtyL05vQmtURUIzUFN0ZkpuVU84eXFsRStkSzBvalRVMTNW?= =?utf-8?B?K3J3U2pBQTJ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= =?utf-8?B?WXAyZitzaitLTGVRVlYwSng0N0lUQmN5MG1kRmtDL2E2M1NXNlpudk9RVnha?= =?utf-8?B?RG0vTVlPS0FVS1JTYVJuNUphblluYnZDTWIxejFhTHA0NjQ4VXVYQmZxQnp3?= =?utf-8?B?dUJKZTVaN0VGLzhkb1ZUZ2hpUkQwNUN4ZU11NzRSRTBFbGdPU1pVSkRWczU2?= =?utf-8?B?VTd5RmtPdU1Ka0hoMHFhUmFWM202cUNFWVBGNzJVcjlxNzFoL3lCVkd1RU1E?= =?utf-8?B?UjVPWHFWNEJjbXVmWmJvQ1JtZDZIY29aYWRpSi9BS25KZVR5bEsyT2tKMXNQ?= =?utf-8?B?a0x2TWVkRDc3SGZ1UHd0eC9QME5wSGhBNXZ5aGlWSk1oTEY0S3FlVjE2dXds?= =?utf-8?B?QTArNHVBNGs1akNabitCeVYvalZKSnJyNm1kTk1OdDgwY2NkRHFKaWIxSVEz?= =?utf-8?B?WldCajRCWnp3cy9jcFdWRG5rSzRoK09xbUFkaFRPT0doT2wzZlVhRkk5K1B1?= =?utf-8?B?RGNtc3kwbDBpV1ZkL2VqWkQzNDB6U21BeGhmTjRUTTBRczVVZDhBYU8xQ2wz?= =?utf-8?Q?9OO1jLmpVd2EBvx4IibBDdaUYKsU4mnDSZu1zg?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39860400002)(39840400002)(39450400003)(39410400002)(39400400002)(39850400002)(83506001)(47776003)(66066001)(25786009)(23676002)(55016002)(38730400002)(6506006)(2950100002)(110136004)(54356999)(50986999)(72206003)(4326008)(4001350100001)(76176999)(189998001)(478600001)(33646002)(81166006)(50466002)(42186005)(8676002)(97746001)(5660300001)(1076002)(53416004)(2906002)(7416002)(53936002)(305945005)(7406005)(9686003)(54906002)(103116003)(86362001)(7736002)(6116002)(3846002)(230700001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1146; H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VYmN742ZBxzaXy9dBE= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1146; 20:WsdcLkTzBJwRBAU87e6ZVSm+N5MTJKhdovk7WEZJPviydfmxr7EvOlQF5n4seKxvRUU3Od9TpIzJoxMVXJFAVu2h5+LNKL4w8U4k7Z8MTygl+p+iqUo9CkMvpX/OuT/G7Q/Xak+N8dbzNxfBXhgQd6zLFzdRHsRmbEMPxaESr6tUzzsT3CbrErKE/5pmJO0++f3mQJxJhBsQciJQME0crQOH7FA8Qvo4GjlaCS1YtplOANblIzbV6smE4Psv2rJT X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 14:58:25.9212 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1146 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 v8 12/38] x86/mm: Extend early_memremap() support with additional attrs 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 early_memremap() support to be able to specify encrypted and decrypted mappings with and without write-protection. The use of write-protection is necessary when encrypting data "in place". The write-protect attribute is considered cacheable for loads, but not stores. This implies that the hardware will never give the core a dirty line with this memtype. Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/x86/Kconfig | 4 +++ arch/x86/include/asm/fixmap.h | 13 ++++++++++ arch/x86/include/asm/pgtable_types.h | 8 ++++++ arch/x86/mm/ioremap.c | 44 ++++++++++++++++++++++++++++++++++ include/asm-generic/early_ioremap.h | 2 ++ mm/early_ioremap.c | 10 ++++++++ 6 files changed, 81 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 3a59e9c..a04081ce 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1434,6 +1434,10 @@ config AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT If set to N, then the encryption of system memory can be activated with the mem_encrypt=on command line option. +config ARCH_USE_MEMREMAP_PROT + def_bool y + depends on AMD_MEM_ENCRYPT + # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support" diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index d9ff226..dcd9fb5 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include/asm/fixmap.h @@ -164,6 +164,19 @@ static inline void __set_fixmap(enum fixed_addresses idx, */ #define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_IO_NOCACHE +/* + * Early memremap routines used for in-place encryption. The mappings created + * by these routines are intended to be used as temporary mappings. + */ +void __init *early_memremap_encrypted(resource_size_t phys_addr, + unsigned long size); +void __init *early_memremap_encrypted_wp(resource_size_t phys_addr, + unsigned long size); +void __init *early_memremap_decrypted(resource_size_t phys_addr, + unsigned long size); +void __init *early_memremap_decrypted_wp(resource_size_t phys_addr, + unsigned long size); + #include #define __late_set_fixmap(idx, phys, flags) __set_fixmap(idx, phys, flags) diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h index de32ca3..32095af 100644 --- a/arch/x86/include/asm/pgtable_types.h +++ b/arch/x86/include/asm/pgtable_types.h @@ -161,6 +161,7 @@ enum page_cache_mode { #define _PAGE_CACHE_MASK (_PAGE_PAT | _PAGE_PCD | _PAGE_PWT) #define _PAGE_NOCACHE (cachemode2protval(_PAGE_CACHE_MODE_UC)) +#define _PAGE_CACHE_WP (cachemode2protval(_PAGE_CACHE_MODE_WP)) #define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED) #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \ @@ -189,6 +190,7 @@ enum page_cache_mode { #define __PAGE_KERNEL_VVAR (__PAGE_KERNEL_RO | _PAGE_USER) #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE) #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) +#define __PAGE_KERNEL_WP (__PAGE_KERNEL | _PAGE_CACHE_WP) #define __PAGE_KERNEL_IO (__PAGE_KERNEL) #define __PAGE_KERNEL_IO_NOCACHE (__PAGE_KERNEL_NOCACHE) @@ -202,6 +204,12 @@ enum page_cache_mode { #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ _PAGE_DIRTY | _PAGE_ENC) +#define __PAGE_KERNEL_ENC (__PAGE_KERNEL | _PAGE_ENC) +#define __PAGE_KERNEL_ENC_WP (__PAGE_KERNEL_WP | _PAGE_ENC) + +#define __PAGE_KERNEL_NOENC (__PAGE_KERNEL) +#define __PAGE_KERNEL_NOENC_WP (__PAGE_KERNEL_WP) + #define PAGE_KERNEL __pgprot(__PAGE_KERNEL | _PAGE_ENC) #define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO | _PAGE_ENC) #define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC | _PAGE_ENC) diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index bfc3e2d..26db273 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -414,6 +414,50 @@ void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr) iounmap((void __iomem *)((unsigned long)addr & PAGE_MASK)); } +#ifdef CONFIG_ARCH_USE_MEMREMAP_PROT +/* Remap memory with encryption */ +void __init *early_memremap_encrypted(resource_size_t phys_addr, + unsigned long size) +{ + return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_ENC); +} + +/* + * Remap memory with encryption and write-protected - cannot be called + * before pat_init() is called + */ +void __init *early_memremap_encrypted_wp(resource_size_t phys_addr, + unsigned long size) +{ + /* Be sure the write-protect PAT entry is set for write-protect */ + if (__pte2cachemode_tbl[_PAGE_CACHE_MODE_WP] != _PAGE_CACHE_MODE_WP) + return NULL; + + return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_ENC_WP); +} + +/* Remap memory without encryption */ +void __init *early_memremap_decrypted(resource_size_t phys_addr, + unsigned long size) +{ + return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_NOENC); +} + +/* + * Remap memory without encryption and write-protected - cannot be called + * before pat_init() is called + */ +void __init *early_memremap_decrypted_wp(resource_size_t phys_addr, + unsigned long size) +{ + /* Be sure the write-protect PAT entry is set for write-protect */ + if (__pte2cachemode_tbl[_PAGE_CACHE_MODE_WP] != _PAGE_CACHE_MODE_WP) + return NULL; + + return early_memremap_prot(phys_addr, size, __PAGE_KERNEL_NOENC_WP); +} +#endif /* CONFIG_ARCH_USE_MEMREMAP_PROT */ + static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss; static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) diff --git a/include/asm-generic/early_ioremap.h b/include/asm-generic/early_ioremap.h index 734ad4d..2edef8d 100644 --- a/include/asm-generic/early_ioremap.h +++ b/include/asm-generic/early_ioremap.h @@ -13,6 +13,8 @@ extern void *early_memremap(resource_size_t phys_addr, unsigned long size); extern void *early_memremap_ro(resource_size_t phys_addr, unsigned long size); +extern void *early_memremap_prot(resource_size_t phys_addr, + unsigned long size, unsigned long prot_val); extern void early_iounmap(void __iomem *addr, unsigned long size); extern void early_memunmap(void *addr, unsigned long size); diff --git a/mm/early_ioremap.c b/mm/early_ioremap.c index 6d5717b..d7d30da 100644 --- a/mm/early_ioremap.c +++ b/mm/early_ioremap.c @@ -226,6 +226,16 @@ void __init early_iounmap(void __iomem *addr, unsigned long size) } #endif +#ifdef CONFIG_ARCH_USE_MEMREMAP_PROT +void __init * +early_memremap_prot(resource_size_t phys_addr, unsigned long size, + unsigned long prot_val) +{ + return (__force void *)__early_ioremap(phys_addr, size, + __pgprot(prot_val)); +} +#endif + #define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT) void __init copy_from_early_mem(void *dest, phys_addr_t src, unsigned long size)