From patchwork Tue Jun 27 15:11:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812461 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 D2A8C60351 for ; Tue, 27 Jun 2017 15:14:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C623027FAD for ; Tue, 27 Jun 2017 15:14:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA86F286CA; Tue, 27 Jun 2017 15:14:33 +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 D09C827FAD for ; Tue, 27 Jun 2017 15:14:32 +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 1dPs9z-0001wo-2x; Tue, 27 Jun 2017 15:12:11 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPs9x-0001vf-D4 for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:12:09 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 46/28-02185-8C572595; Tue, 27 Jun 2017 15:12:08 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSW0gUYRTun5mdHcOx313F05Zam6ZF3pCsXqS CIOmClydNqNmc3I3ddZtZxV5EZEuywugiuJqpWXTxloaaXR60zdTNIktDTG0pokIrCuxil5kd L/U/fed8l/MfOAypcdA6hs+384KVM+vpxZQxJnJbVE9uanpszdOVG+s+X6Q2o+2u2z+JZJShM lkNOfn7VMYbT36rbQ/25Ts9pkLkTilBPgyFHSQ0dgslaDGD8BkEDcOnSbnQ4KMEnC6boWUVjd fB0ORXQsZavBO+9L1UyTgAVxPgKcOygcSTNNwbcHsNBF4O1bWXSGVEODRPdHsxi7fDnVdl3iA fnAQXzg15sUbqu7/fVcs4EIfA1UGHStH7Q2/5a6oEMdKANdDUGSO3SRwK7ZOV3kjAK6B9epqW /wC4GMGPmXGVkhkGzi9P1IooGFyPKikF74Jbr0dJORPwKuhz7Fa8lwj46G6aDT1Jw52iWc1aK D2xTdF41OAarKBmCxUMlLYgxdBGwVhFgoLNMFXfSs/h558fzhrcKjjW0EsoRYc/THe/VZ1CUc 5/NnUubOr8Z9NqRF5DkSIv5PFCVFx8tEEwZRvtFs5kjoqLjY+28KLIZfNmziBG78+xtCDpJBZ JrwO1tSd1oaUMoQ9kr0NqusbPkJN12MiJxr1CrpkXu1AEw+BaV1GajrLmWHk9sFq7JPMX+Gw+ /4DJLJ3YnBIYX30AO2STaFa0cRbRlK1QfWilLogtFiUCy4Qx1zpvmzvOpyhYp2WR9CeNr40XL Cb7//x7FMQgvZatkVN8TVb7fPp7aTAhDaaqkuXBdm6B0hUix1T1/UNVwcWZNsOOmdV14Co9Du uznh2M8VuSEbMps76x+0j5xa1b0tsnppr/XP5x07Bnx4vWYr9EfkTzqSUlpNGda/+QpP8WUSC MZC4LeNffO3qeVtsrlreMV7FviobHEsJ+PS7YcDb0d79H1LaReQmh4Vd6wNnPVTV1piWmFegp 0cjFrSUFkfsLARB1iZcDAAA= X-Env-Sender: Thomas.Lendacky@amd.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1498576325!52141290!1 X-Originating-IP: [104.47.40.69] 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 61403 invoked from network); 27 Jun 2017 15:12:07 -0000 Received: from mail-co1nam03on0069.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) (104.47.40.69) by server-9.tower-31.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:12:07 -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=qQu21D0HZPCx09fKfRZhpbkRkA/HHWKldRX9IFFUqJ9N08DtLXl2WOZ7Zepbwf+mo1P3dx8hfQWVOOreuJFbNdTyhUx4MoGKbZe/Zm1n57TvB/l61sodIZScZKbESSuO/LJUjGFilX4Y9IipASL5HpKD+/qaC+eTSVnU/7y9h7E= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.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 15:11:56 +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:11:53 -0500 Message-ID: <20170627151152.17428.46131.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627150718.17428.81813.stgit@tlendack-t1.amdoffice.net> References: <20170627150718.17428.81813.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: CO2PR07CA0051.namprd07.prod.outlook.com (10.174.192.19) To BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.141) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b4e84797-61dd-4365-b18d-08d4bd6edcc5 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); SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 3:iGlfylgm1TChxi7i3CF+9nBNknbziYKyjASZtVELAjpI3KaE56fKr5UcBIrrnxU/VMhcmneK369TwKgCNClhgPshq35nLzefvZvGUooS62b9b048Ld3E0sRCgYMa/GwXfRX05bGWl4u6DAd/9qAMvGrefSM+VnDwKvzeL4tOYcWga/fgX+Tbn8Hd0iOg0wzeJo6dnfAn/ciwsBp1VJ1nyxE9ObSNhVZpnDCk+10z+e193EqRV1o+Ku0GKaV5VoYOBsSdjL7a/11mkSfv4P00BayunVZ/dVJ4sDa8EcPlPq5TbhaoffFCz8980TWZquMI3OkaTXcB1PTLzWyZVPIw7vl5OFtv+Ommz6P7JcLN6LuN3LxFB60L6osNgKExq+6TwmppRCJAcUuoAKWYP8/oLxh5xWVYbB6A5Jn71+dexx0aCgm0rznDxTZWROjX2j3OU1C9LPXzqwFD3HrhTaQfe+Hyshnb90CJ0lGbRmqtFQBOWeF8matXxpOaDHndqiroUEkPPr1/gjrz3tCZH4aw7SYkKb3Ayr64FXNGj7leq9sx0Xax6LaboHMJjyO0Bl9D7yvem3ycerPESiKHYwyuHcxgjZZ9bVu2DlRlk16USnBOykrLbyd2SCcJrNB1ZNgV+9qCl2R0Tm0n87vGaRrpjgk3o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6GmLzwSEqL/hCKBu5tGL7I/SYbOKeFFU/U1HDhUN+w3tJ0k6YeGKW9HNiX7nHTiKQ8kixb5yb3X+R8cLl16tg/El+LwBHxe/SkLzxEu3KIBVqeZSe1K+VlJysFCApvJ7rqoAByEaa56GApm/RQHLxFcZuPyZxX7LiKx6JIaDdmlGMY3rG0F3otc/EsLQ79C9V 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)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123558100)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1139; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM5OzQ6YkZoZXJwRjl1SVUrQ2ZrbUExRUJLU3R2Tis0?= =?utf-8?B?c1JEU2VsdWJFN2oySnFLd0RjbURZa1UzNS9ZZ3JDZWVqcEN3R2lPVm5xeUNC?= =?utf-8?B?ai9PSnNMOEtBY3lhSkc5ck5qRm1MLy96cll6Q3JuUCtFTlJvaXY1ZWFsSmxt?= =?utf-8?B?dkVwQVBvTms4dnY3dnU0elgreUdGRUpSUVR6MGdoTmlQemRPVDhkRnBjOEVY?= =?utf-8?B?Wk43UWlpTk1leG1xY2VoclpQUzN0V1ZvSDh6MUs1Y0FxcWc4bFVnRDdXTFhR?= =?utf-8?B?NTFjcXJMaFp3RXBjb21MK21BYkJ0TU5o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U8zY3ZRN1M5RWJXTHhXUTZvWnNneVc2RDN6UE1nNkZB?= =?utf-8?B?KzBCK0xCZmxyWWhBNGFjbGpabXllVmR0Y1QydXMvZEE4RTArc1JOaWxwOTJk?= =?utf-8?B?OStGS1lRekl0WUFJdFgwMDZrTDA4Y1ZCVTd5dzBjU0V4Mm4vVDNhelppeFhX?= =?utf-8?B?eXkvK1RwK1hZKzA4K2ZicWw3ZTUvYWhNWDI1b2FDM0tDUTVVTXFwU2dNdW9W?= =?utf-8?B?U2RVU0svOEdPcDMxQkFJY255UHBGYWY1TnhlQ0tlSE9jVU5KeENaS0JuTzN1?= =?utf-8?B?azI3cnZ4cEE2RzJ1dkNrWkg3ZGJGb3ViRGxjVGp4MSs0TXFHM3ZzM2FmTWF4?= =?utf-8?B?cUQrd1l4bmljL3NRUDAyMzhwNko4VWxXcmlRN1V0SWZZNkZ2a1hyOXN4Q2Rs?= =?utf-8?B?QzIrYWhSM25Td1dKQzVxVWRPYVpHdDZOOE5mS0E5d1dRNGJMbTJ6OXBhRlJK?= =?utf-8?B?ZDFVd0lOSnBqMHNlT05YMnd0TmhDME5HUkFWaEJGVW5Ccm5BS21odkE4clNm?= =?utf-8?Q?fWB69GnYyEqcBaX/+GbzfQCVfAi4I1sK0KeQ=3D?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39850400002)(39400400002)(39840400002)(39410400002)(39860400002)(47776003)(230700001)(50466002)(110136004)(189998001)(50986999)(76176999)(54356999)(53416004)(72206003)(42186005)(478600001)(33646002)(305945005)(38730400002)(97746001)(83506001)(103116003)(23676002)(8676002)(66066001)(7736002)(4001350100001)(4326008)(81166006)(7416002)(7406005)(6506006)(1076002)(2950100002)(6666003)(9686003)(5660300001)(86362001)(53936002)(2906002)(6116002)(3846002)(25786009)(55016002)(54906002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1139; H:tlendack-t1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dnEPwoMF1ufAdrbmuq7ofksPl+3L6AIPd76PcO+RMcDervMgsQ= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1139; 20:bTaldPL/a+Pvo7rZPP6zLRj8y5+M7ZUI3aE+B8BDoFh2Pcnx+hyApUuI8hWv/yNSmG4SBtsMFjYqSTq83HxGbDgyH5WM6jbVuV+I+5mU/Y/vrpqjJlvY4+Nwo638/2rgHRvOAJtVqr1Sce2XL+fpWUHuO5PDUZ4O0nlDcnqz3WRWeDuPEisnf+Cm5Cc2qPitVKuxMYIPRGwfk6jQ34rXk1iasg1JA9tgij/wtiH0lwKqZTWLacIHNK9isO+JUZm8 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:11:56.7984 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1139 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 RESEND 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);