From patchwork Tue Jun 27 15:00:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812253 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 3CA1860351 for ; Tue, 27 Jun 2017 15:03:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67E0428111 for ; Tue, 27 Jun 2017 15:03:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C06B28401; Tue, 27 Jun 2017 15:03:17 +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 6FD662818A for ; Tue, 27 Jun 2017 15:03:16 +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 1dPryp-0005W6-E6; Tue, 27 Jun 2017 15:00:39 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPryn-0005UH-H1 for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:00:37 +0000 Received: from [85.158.143.35] by server-8.bemta-6.messagelabs.com id 23/88-03696-41372595; Tue, 27 Jun 2017 15:00:36 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSa0hTYRj2287OjuLic/PyOvM2s4vkDSK0iPw TaKSYEWE/0jM9utEues6MRVAaliaUkRa5zLyU5A1JLaVUVNBUVCxJAzNqqJClZgoGknWOm5e+ X8/zPc/zXuClxPI8UkkxZhPDGmidinQiNKGBQcEKLiEx7G1PWMTTpSoiCkX3vlkTxaPzEq1Bb TQnSzQvRtelGX3JZotVm42GThcgJ4rAuWLoyBlBAkG4CEHDxD2xQOT4pgh6quqIAuRIkfggjM +viASswCfgfssMErArLheB9QEWAmI8T0LnyBApCCK8G8orn4kFTOBAKKgt3Cgkw9GwWDy+EXb EMXBntmvDI+f/b3cvSwXshn2gZixXYvO7wEDJNJ+l+AYHoPF1qPAtxr7QOl+6EQXsB62rq6Qw A+B8BJ1lo4St5h6wLI9KbSZv6B0uJWw4FvIeFkuEmoADYDA3zpbtFsG3WWFOgQyTMPn3lj0QB GPLP+yCVQrr0/VSO5FA4UIxspFXBCz0f7T308Hsn35iE39Y6rfHhySwMtYssQltLtBbYbiLgi 07drVs72rZsWs5Etei/RzDXmLY4PDIEDWrTdeY9LRWFxwedjhEz3Acnc7oaDUXkmLUNyH+Khz 414Z+V8f3IE9KpHKT1UFConyX2ph6WUNzmiQ2S8dwPWgfReHK3utnlITBaGBUIHuSydtcWCad MadpdfyVbTqBcla5ysYzeFnGZdB6TptukwaRv9JDxgo5LAiaLMNWbPM+3yNvpUKG+JnkzhkMq 9ea/tfnkAeFVAoZaeSrOGsNpq3qc3xjEd+YKIsXGpvobUmZjRTSiObVq/1Xpn61y2saApLHjt aoPXWNysJH5yrexfiRVanZ+Ws/i3KS0o411b90CI0tK4/qbFWnpaxZfZCHV9C1C1+/yyuqM6P 8vQqO1GSR7ckzYeak2JbIxpwvx2+cbNv7eGZyYqLvrHuXJmfg81q98VTHojxuyt235PnoobhP F1UEp6HDg8QsR/8DYrw63JoDAAA= X-Env-Sender: Thomas.Lendacky@amd.com X-Msg-Ref: server-14.tower-21.messagelabs.com!1498575634!69239077!1 X-Originating-IP: [104.47.37.42] 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 44719 invoked from network); 27 Jun 2017 15:00:35 -0000 Received: from mail-cys01nam02on0042.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) (104.47.37.42) by server-14.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:00:35 -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=UvmsxGsmigxJvVqDA+y3G3zFQc5sTTorU0kKlJ5j+Z8=; b=SkKdfFgiaR6qR7G/fYwHf5/B2pZjE3XT4sPMw1+PsFxV6Nrc4jGEtRD7nm+c6KB75mJmHIjAdi1upfpZloRCwprm6pmmJNZ8TwXR+FAEkjbtCPguzUOrcAvvV93AFzMfgZxs7+qflQm6zrbrxXGqR0fD92XD2M8ffL/Df00SWZI= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by DM5PR12MB1148.namprd12.prod.outlook.com (10.168.236.143) 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 15:00:30 +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 10:00:27 -0500 Message-ID: <20170627150027.15908.70421.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: DM5PR17CA0048.namprd17.prod.outlook.com (10.173.128.162) To DM5PR12MB1148.namprd12.prod.outlook.com (10.168.236.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95f2a11d-b0df-4a97-27ba-08d4bd6d4144 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:DM5PR12MB1148; X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 3:wtCvu8whZxw56eTh/TzqtE9WCAOO9qaqWJJAQXTkRVcCbqSn7zkS/1Ew9kjyBjN3E1pbsQbalQBFjHALpkDb6hFzef8StazRCpXgFzTgnBflvp7x7mLF9z52zL8Y5POD6fjTG/y+i9kZ8g6gLSkA0nM+HN4oyD6FNkIii76RcXgCnj4uykKeFsuoHiLRuIEw3oRk4PsE1TqIxUnm/UBnqnU2dDA6xUPbdl1DJyYMdaBoiAVf1mUiQeW1ptITLvkqz/fo5U7wvIdOHV/JmJMGHf1goAZB7tFTLFJrQEKnsPFg68Ji8yfehbSeOy771C19G5EurBlhH+EbOFUKQ7XMUkO8Gi1e0nY/4vAgCkbXftdk5waRBuEsH17MS2X6fWSwkmZUqSBeEU1i+WMWzR8o+LwS+f7iepriJBXmBBR8jAy8w1YvL+Pq/jGUoTFA5RKhkHm8VZJAMkQHDs1T4a1RE6zYQmS6DYa2WAe8N3gqNvc4+aRqNCogfMnCVoNoaklPmik1/vp+cbNdegFILVeCeUCvrLV7+rhGh4DlN8pmVvinwDMd9vmG4TGXu+93GIPuph8OL/1tpD3bNAgJK6ZyjTWmVlPacmI84ucbz7pczAHalt3zODQ6wdYl1iJjbjt0VS5ZL5JISZomMeyQZ33Tw9uc1vuRIDKKLdlZNLPww3sZWu8iHB+V1QAz4P3zBvr7l1LfVT5xA1OlencyYFZ6bGjTJHyXm2Ubb444QpGfaADdMZ67tGekOnPJSg89VkIJ8U1DMvSd6YrCxHmP0vT7FQ== X-MS-TrafficTypeDiagnostic: DM5PR12MB1148: X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 25:Xf3wyuAeRSws265683VthEVo3r1bhOT64g3u3+MYMbCKYYRergyd5at1r3EHpM1mCtfZSGwcBWC4/kij7K3ZhwSVwgmSiVMKevZMdAOMN+0PqP1daKMXARTnMjVUzOT2S8sGs0gaWiqJnl6GKQAGuAnwne2+QmC070dIws04iq28ZEsQsbfstQLRSLbirLOUt0wrwgFR9Ay7jnl/AxQhSgH0+DQH2QpD2khZA1C1eQyz02avX6o5L+BF63HBDJlWMcfirlpKRxdXxc4m6CJqDli2JXzU3g0bOwA+BS0wuVjts/Jr2WAW66WSqyIKv7kov46/D5RugHSZdyrCpxnZm8Zh4vsc2//VYymanhRQEIyYhCVa/c3Iz2XrH31gy8wY7nmIRWZJKQvk3dSCJstdBcV+SsZlGongurc2erMD2AVe3GEbRlevWvPpTot2MgpRbQvJr17IFkKkZeOlC8dhcHtnziqOzolK8PwDjn4GD8BSM1TZIN1vmhdqTpggRGdimMi05sVSlBQpor/tk/u/6sRWZIGX4jNU4LYlp+dUEBHmzdpwtBJ1CGja7wHmPQ7ggvTzhjc+sKGHOzm3KLr3jj9HKoYVsYO0N49kEz6Xr1MgCoSaiFw430YQ6P5+RK/vif+FSHwxKXtf78o8HVGDlX6ujREjvArONEC0ZL8T0gn6g927sBOEzjO78w1BR1U3681UURmgfYD9gpT2geV7nhzfbO2H08UNrX0CgCHCfBoSqWouVlONSGamas7zY9rWHUmdtjzpvC3gXFsuJe5GViPQOVyn5G0eMqUSBLtWp3HifXF/10FQULxCbOpNipq+5X6bP72meAtHQ0TWbgGULImoNwv/pAHng3p5u6fGTnj+G/dbd4Ok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lrXy9Bovt3vrirkHJfSFB0A4yJ9eFgN3WFGC3xwpUnrmVJbTY4+pPvv7jf6wx1iWwnS9umY+77jiLAc/iZJwh2BNrsmruNP8+iikPeLBZhCQAZShHYBiuJMccC7ukNEyPC36N+JmLY1E6XsgWsTZVilv6QH2pA2JAIDKWKLXAuOmLjxUYhcjCgjuyr+5uNxUglFs1eW4JHB30ft8pQd6RSqnbvxRGdG1DpCvINH4KALxYpLX8MC0qRDHLjPTjl X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(767451399110)(167848164394848); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR12MB1148; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR12MB1148; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ4OzQ6Z29XUlZ2T0EwVndUZXF5RjNGK1pXa1l6ZTRh?= =?utf-8?B?RDRmTzQxMXYwdWVnUzFDUk5ZS0tpSWQvNHFQSXFkSVRYem1oWnRyb3BpMTdR?= =?utf-8?B?c2xOWTR1NFZXd2NtMVcyRWtRNkhrQ282RlJ4YkJUK2JLajJiZlNLRVExTDk3?= =?utf-8?B?UXNQRmRCSWJTVnRjS3lDUG84YzRkSVp4d2RMc1F6VGpoQUNkMG80cXhSRlBC?= =?utf-8?B?MDE0MExvYXcxZEs3M1lUV0NNSzhkV2l2OXVUT3lJYnQ3YzV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oVWJRakZOaTFGdi9hVkhzcDhlU1E1eEI4?= =?utf-8?B?OVh5aUNYYnBseEFTY0FVL29ZVVZzMmVXbnZvWXpzUk1DZ0wyeEMyUzJxR2Vk?= =?utf-8?B?UW94YVE1WFoydHk1N09kbFJ0Q1JNNkd2NmVYQnlaYWo0WWl3SUVRK3d1WG1s?= =?utf-8?B?M2xVbkJ0dktOYVV6dTJkeHpYbmxJZWtVTDl4SU1qejZLWW5lRFhZa2oreEJG?= =?utf-8?B?UnVCN0JOdWYyU0piRUtQSUN3KzVmTGNDMjV3K0JXdGxESDN6WGNJWG4xK0pZ?= =?utf-8?B?K3kzeFJUTER3dGV5ZGlGaEx2NGlFNzZ5V0kxVTdXZVhIUE1LdEk3dWh6bnY4?= =?utf-8?B?RkU3ZlVLQmxTQWdubnltYmk4S3NDcDArWCtxb1pVU01wc1ZaNTFud3lpbWtw?= =?utf-8?B?Tm85NElkZVFveUNWc2lqMVJXMXBMM2E1eTluQUVYY294WHBGS2hCbGkvNDFT?= =?utf-8?B?MkMzc045THhDQ1dsV2ZsNThzOFZTc3ZrdGZQSkFKbzB0bmRNaUJtK3piRjJl?= =?utf-8?B?aFpQbExGN2lrcmIrUjlzN0pDRlhzQmtON3hOMDJpdWVDbnA1eUZsaXNjRGlp?= =?utf-8?Q?PjZQkBwympFYUaggPiZoE/9Vdsz2Dhyg/JIU=3D?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39860400002)(39410400002)(39450400003)(39400400002)(39850400002)(2950100002)(478600001)(6666003)(2906002)(6116002)(3846002)(53936002)(9686003)(7406005)(55016002)(83506001)(50466002)(110136004)(1076002)(305945005)(72206003)(230700001)(33646002)(7416002)(54906002)(54356999)(76176999)(50986999)(97746001)(4326008)(189998001)(7736002)(5660300001)(4001350100001)(103116003)(86362001)(8676002)(42186005)(23676002)(53416004)(25786009)(47776003)(81166006)(66066001)(6506006)(38730400002)(921003)(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meKWNEULxWAusQ5bP52/hBrRBUW1S4U+Hj73SfWnXGQTjtZU+jh/n6S7m4fLvTuC4GiD564F3M= X-Microsoft-Exchange-Diagnostics: 1; DM5PR12MB1148; 20:LHKu0QZItmSmAXDpiW6JEHo8ygnq1i3HA2sYxBedXQL//dhtk81fL9lmtbLsDYCUGzxTVlBgLPppd3UGmMuQ56Yh1akATU6fIiadP1JbFlpMzEARTwfrOHgdT8PimMYbCTsYvq++BpgWMlS/LmN4f07VkJD3V6npmBso4XjHgzo8xNwcwN+EcKVUndVz7TAez/0AxCIOyUZA7l0BkDd0LfWrWlsNsdHK/a3GI1Wsx8MjrtE/mRjR6CQQb9MhfTxJ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:00:30.2028 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1148 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 24/38] x86, swiotlb: Add memory encryption support 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 Since DMA addresses will effectively look like 48-bit addresses when the memory encryption mask is set, SWIOTLB is needed if the DMA mask of the device performing the DMA does not support 48-bits. SWIOTLB will be initialized to create decrypted bounce buffers for use by these devices. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/dma-mapping.h | 5 ++- arch/x86/include/asm/mem_encrypt.h | 5 +++ arch/x86/kernel/pci-dma.c | 11 +++++-- arch/x86/kernel/pci-nommu.c | 2 + arch/x86/kernel/pci-swiotlb.c | 15 +++++++++- arch/x86/mm/mem_encrypt.c | 22 +++++++++++++++ include/linux/swiotlb.h | 1 + init/main.c | 10 +++++++ lib/swiotlb.c | 54 +++++++++++++++++++++++++++++++----- 9 files changed, 108 insertions(+), 17 deletions(-) diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 08a0838..191f9a5 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h @@ -12,6 +12,7 @@ #include #include #include +#include #ifdef CONFIG_ISA # define ISA_DMA_BIT_MASK DMA_BIT_MASK(24) @@ -62,12 +63,12 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size) static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) { - return paddr; + return __sme_set(paddr); } static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr) { - return daddr; + return __sme_clr(daddr); } #endif /* CONFIG_X86_DMA_REMAP */ diff --git a/arch/x86/include/asm/mem_encrypt.h b/arch/x86/include/asm/mem_encrypt.h index ab1fe77..70e55f6 100644 --- a/arch/x86/include/asm/mem_encrypt.h +++ b/arch/x86/include/asm/mem_encrypt.h @@ -34,6 +34,11 @@ void __init sme_early_decrypt(resource_size_t paddr, void __init sme_encrypt_kernel(void); void __init sme_enable(void); +/* Architecture __weak replacement functions */ +void __init mem_encrypt_init(void); + +void swiotlb_set_mem_attributes(void *vaddr, unsigned long size); + #else /* !CONFIG_AMD_MEM_ENCRYPT */ #define sme_me_mask 0UL diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 3a216ec..72d96d4 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c @@ -93,9 +93,12 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size, if (gfpflags_allow_blocking(flag)) { page = dma_alloc_from_contiguous(dev, count, get_order(size), flag); - if (page && page_to_phys(page) + size > dma_mask) { - dma_release_from_contiguous(dev, page, count); - page = NULL; + if (page) { + addr = phys_to_dma(dev, page_to_phys(page)); + if (addr + size > dma_mask) { + dma_release_from_contiguous(dev, page, count); + page = NULL; + } } } /* fallback */ @@ -104,7 +107,7 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size, if (!page) return NULL; - addr = page_to_phys(page); + addr = phys_to_dma(dev, page_to_phys(page)); if (addr + size > dma_mask) { __free_pages(page, get_order(size)); diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index a88952e..98b576a 100644 --- a/arch/x86/kernel/pci-nommu.c +++ b/arch/x86/kernel/pci-nommu.c @@ -30,7 +30,7 @@ static dma_addr_t nommu_map_page(struct device *dev, struct page *page, enum dma_data_direction dir, unsigned long attrs) { - dma_addr_t bus = page_to_phys(page) + offset; + dma_addr_t bus = phys_to_dma(dev, page_to_phys(page)) + offset; WARN_ON(size == 0); if (!check_addr("map_single", dev, bus, size)) return DMA_ERROR_CODE; diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c index 1e23577..6770775 100644 --- a/arch/x86/kernel/pci-swiotlb.c +++ b/arch/x86/kernel/pci-swiotlb.c @@ -6,12 +6,14 @@ #include #include #include +#include #include #include #include #include #include + int swiotlb __read_mostly; void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size, @@ -79,8 +81,8 @@ int __init pci_swiotlb_detect_override(void) pci_swiotlb_late_init); /* - * if 4GB or more detected (and iommu=off not set) return 1 - * and set swiotlb to 1. + * If 4GB or more detected (and iommu=off not set) or if SME is active + * then set swiotlb to 1 and return 1. */ int __init pci_swiotlb_detect_4gb(void) { @@ -89,6 +91,15 @@ int __init pci_swiotlb_detect_4gb(void) if (!no_iommu && max_possible_pfn > MAX_DMA32_PFN) swiotlb = 1; #endif + + /* + * If SME is active then swiotlb will be set to 1 so that bounce + * buffers are allocated and used for devices that do not support + * the addressing range required for the encryption mask. + */ + if (sme_active()) + swiotlb = 1; + return swiotlb; } IOMMU_INIT(pci_swiotlb_detect_4gb, diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c index 0843d02..a7400ec 100644 --- a/arch/x86/mm/mem_encrypt.c +++ b/arch/x86/mm/mem_encrypt.c @@ -13,11 +13,14 @@ #include #include #include +#include +#include #include #include #include #include +#include /* * Since SME related variables are set early in the boot process they must @@ -177,6 +180,25 @@ void __init sme_early_init(void) protection_map[i] = pgprot_encrypted(protection_map[i]); } +/* Architecture __weak replacement functions */ +void __init mem_encrypt_init(void) +{ + if (!sme_me_mask) + return; + + /* Call into SWIOTLB to update the SWIOTLB DMA buffers */ + swiotlb_update_mem_attributes(); +} + +void swiotlb_set_mem_attributes(void *vaddr, unsigned long size) +{ + WARN(PAGE_ALIGN(size) != size, + "size is not page-aligned (%#lx)\n", size); + + /* Make the SWIOTLB buffer area decrypted */ + set_memory_decrypted((unsigned long)vaddr, size >> PAGE_SHIFT); +} + void __init sme_encrypt_kernel(void) { } diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h index 4ee479f..15e7160 100644 --- a/include/linux/swiotlb.h +++ b/include/linux/swiotlb.h @@ -35,6 +35,7 @@ enum swiotlb_force { extern unsigned long swiotlb_nr_tbl(void); unsigned long swiotlb_size_or_default(void); extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs); +extern void __init swiotlb_update_mem_attributes(void); /* * Enumeration for sync targets diff --git a/init/main.c b/init/main.c index df58a41..5013cbc 100644 --- a/init/main.c +++ b/init/main.c @@ -488,6 +488,8 @@ void __init __weak thread_stack_cache_init(void) } #endif +void __init __weak mem_encrypt_init(void) { } + /* * Set up kernel memory allocators */ @@ -640,6 +642,14 @@ asmlinkage __visible void __init start_kernel(void) */ locking_selftest(); + /* + * This needs to be called before any devices perform DMA + * operations that might use the SWIOTLB bounce buffers. It will + * mark the bounce buffers as decrypted so that their usage will + * not cause "plain-text" data to be decrypted when accessed. + */ + mem_encrypt_init(); + #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start && !initrd_below_start_ok && page_to_pfn(virt_to_page((void *)initrd_start)) < min_low_pfn) { diff --git a/lib/swiotlb.c b/lib/swiotlb.c index a8d74a7..04ac91a 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -155,6 +156,15 @@ unsigned long swiotlb_size_or_default(void) return size ? size : (IO_TLB_DEFAULT_SIZE); } +void __weak swiotlb_set_mem_attributes(void *vaddr, unsigned long size) { } + +/* For swiotlb, clear memory encryption mask from dma addresses */ +static dma_addr_t swiotlb_phys_to_dma(struct device *hwdev, + phys_addr_t address) +{ + return __sme_clr(phys_to_dma(hwdev, address)); +} + /* Note that this doesn't work with highmem page */ static dma_addr_t swiotlb_virt_to_bus(struct device *hwdev, volatile void *address) @@ -183,6 +193,31 @@ void swiotlb_print_info(void) bytes >> 20, vstart, vend - 1); } +/* + * Early SWIOTLB allocation may be too early to allow an architecture to + * perform the desired operations. This function allows the architecture to + * call SWIOTLB when the operations are possible. It needs to be called + * before the SWIOTLB memory is used. + */ +void __init swiotlb_update_mem_attributes(void) +{ + void *vaddr; + unsigned long bytes; + + if (no_iotlb_memory || late_alloc) + return; + + vaddr = phys_to_virt(io_tlb_start); + bytes = PAGE_ALIGN(io_tlb_nslabs << IO_TLB_SHIFT); + swiotlb_set_mem_attributes(vaddr, bytes); + memset(vaddr, 0, bytes); + + vaddr = phys_to_virt(io_tlb_overflow_buffer); + bytes = PAGE_ALIGN(io_tlb_overflow); + swiotlb_set_mem_attributes(vaddr, bytes); + memset(vaddr, 0, bytes); +} + int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose) { void *v_overflow_buffer; @@ -320,6 +355,7 @@ int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose) io_tlb_start = virt_to_phys(tlb); io_tlb_end = io_tlb_start + bytes; + swiotlb_set_mem_attributes(tlb, bytes); memset(tlb, 0, bytes); /* @@ -330,6 +366,8 @@ int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose) if (!v_overflow_buffer) goto cleanup2; + swiotlb_set_mem_attributes(v_overflow_buffer, io_tlb_overflow); + memset(v_overflow_buffer, 0, io_tlb_overflow); io_tlb_overflow_buffer = virt_to_phys(v_overflow_buffer); /* @@ -581,7 +619,7 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, return SWIOTLB_MAP_ERROR; } - start_dma_addr = phys_to_dma(hwdev, io_tlb_start); + start_dma_addr = swiotlb_phys_to_dma(hwdev, io_tlb_start); return swiotlb_tbl_map_single(hwdev, start_dma_addr, phys, size, dir, attrs); } @@ -702,7 +740,7 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, goto err_warn; ret = phys_to_virt(paddr); - dev_addr = phys_to_dma(hwdev, paddr); + dev_addr = swiotlb_phys_to_dma(hwdev, paddr); /* Confirm address can be DMA'd by device */ if (dev_addr + size - 1 > dma_mask) { @@ -812,10 +850,10 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, map = map_single(dev, phys, size, dir, attrs); if (map == SWIOTLB_MAP_ERROR) { swiotlb_full(dev, size, dir, 1); - return phys_to_dma(dev, io_tlb_overflow_buffer); + return swiotlb_phys_to_dma(dev, io_tlb_overflow_buffer); } - dev_addr = phys_to_dma(dev, map); + dev_addr = swiotlb_phys_to_dma(dev, map); /* Ensure that the address returned is DMA'ble */ if (dma_capable(dev, dev_addr, size)) @@ -824,7 +862,7 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, attrs |= DMA_ATTR_SKIP_CPU_SYNC; swiotlb_tbl_unmap_single(dev, map, size, dir, attrs); - return phys_to_dma(dev, io_tlb_overflow_buffer); + return swiotlb_phys_to_dma(dev, io_tlb_overflow_buffer); } EXPORT_SYMBOL_GPL(swiotlb_map_page); @@ -958,7 +996,7 @@ void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, sg_dma_len(sgl) = 0; return 0; } - sg->dma_address = phys_to_dma(hwdev, map); + sg->dma_address = swiotlb_phys_to_dma(hwdev, map); } else sg->dma_address = dev_addr; sg_dma_len(sg) = sg->length; @@ -1026,7 +1064,7 @@ void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, int swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr) { - return (dma_addr == phys_to_dma(hwdev, io_tlb_overflow_buffer)); + return (dma_addr == swiotlb_phys_to_dma(hwdev, io_tlb_overflow_buffer)); } EXPORT_SYMBOL(swiotlb_dma_mapping_error); @@ -1039,6 +1077,6 @@ void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, int swiotlb_dma_supported(struct device *hwdev, u64 mask) { - return phys_to_dma(hwdev, io_tlb_end - 1) <= mask; + return swiotlb_phys_to_dma(hwdev, io_tlb_end - 1) <= mask; } EXPORT_SYMBOL(swiotlb_dma_supported);