From patchwork Fri Jun 16 18:54:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9793313 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 C0DD760325 for ; Fri, 16 Jun 2017 18:57:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3AF42865B for ; Fri, 16 Jun 2017 18:57:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A82A328670; Fri, 16 Jun 2017 18:57:00 +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 BDEDF2866B for ; Fri, 16 Jun 2017 18:56:58 +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 1dLwON-0003np-Ps; Fri, 16 Jun 2017 18:54:47 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLwOM-0003n3-JK for xen-devel@lists.xen.org; Fri, 16 Jun 2017 18:54:46 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id 49/F3-03058-67924495; Fri, 16 Jun 2017 18:54:46 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA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s.com!1497639283!55221928!1 X-Originating-IP: [104.47.38.78] 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 1164 invoked from network); 16 Jun 2017 18:54:44 -0000 Received: from mail-bl2nam02on0078.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) (104.47.38.78) by server-15.tower-27.messagelabs.com with AES256-SHA256 encrypted SMTP; 16 Jun 2017 18:54:44 -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=F+jMwYkBA3bpANX2UJ4+P6u4nVLHmlNhe8V914ikmH0=; b=Sp5iH4xJVEIlMpYYry+HRaPFw9TAwB102ztvIkd33MUV5FHUPlZI5NTJn2G+NPlzekWFUttarrXcGytb5Y/8QlpSiBtUgQKi41sKJ0CEc5toSbgblhRx9GzkwPp480tKmG+ZRxFHcC9V6Uo8LzlISXHcUQo45ZYQ2hp77sfcU/0= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Fri, 16 Jun 2017 18:54:39 +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:54:36 -0500 Message-ID: <20170616185435.18967.26665.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: MWHPR1701CA0009.namprd17.prod.outlook.com (10.172.58.19) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR12MB1141: X-MS-Office365-Filtering-Correlation-Id: adef362e-0566-432d-370e-08d4b4e9259e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 3:lOhRE5KrbjlKiyJLCYDb5yEcan8PYj6U4Kw+2IBhMSBzq6mPRBry6z2sRcmDNHRtXubVCDH3zKsof/odlrq/aFvO1N0XBQN4pADeJgWXQYjPhLxTAA29LVmt9OjoqhxZFJstXbtRVyZu6eLZhBOq5Iy4yEkjFM3xFFUdfEO0nErXIB/mRj8ok3FEUDOENupdMO5pnEPOj0abTe/6hK0ksTrbmQrAYTHvfWgivqiWE3jzF+IzdLRWqNe0eyDYPy44NMx8+ipY7WKNxXrqt/+koQMUACXFQx2n5qtEKcmXshq83N5rjTBKbqpFGujrzUaa6UGw2QcNpTZa0PVKDLQjAPg+UZ2zSAPjKomaC4392/s=; 25:zbfinA7TxRLLFqHXX98l8WUKXU0sTjRk6NgksmD56ranFbWroYzQuo2aPV8bZzQwRlhfwEnpy/weWQQ50SEJcchV5SdmgSFQ1ZILCTz9No+s8+c7tBpCr3kWE79jlODw1OLeAJJB9jc8XCA+wVby2Msi/O6LrIH4xQ/PQbNeVAearOfgKbh8w8cC3ImxHGMor9yiHMX2/16/vVgUwaBePon4irUQWXHwtysdJtOUBaWYq3frvW1VWwVwA7OJCDiaVpaLkRSGcglH76TYgp8kQ5Uuo/pB6IZU5dm11T+sgF3PVF4T20s4POayonAluiG4bdx+2SMZrvASI10UHvKS20RAAig2Q8IS41/rNZEVMB1LB7VbdEyxZABVJTTkSIOMUJvFZAugLhlWz6itZE+UZrHRwtiRZrJ+XKECS3EgQuekz1hfdNgJ7fTOZuD2ljykBuiBhzvoGhsRcoPl0iX+wgf33LRUJDKp7GPexpt/EV8= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 31:4Xmbgo9GWInOpgNrEkfXPEDc5Nu5PirALI8RoY9kh+2nzbgW3/Ut1sLcEAMVdJNXbcjpDdN96tADJ/Vcu+NkVljMDZ6sZ6l3fcsYsJuAJtZOEeNEdx/bXmBBwrOITRlEtEUxpPo0bbTIN/8vWDtJYrLL8n/o+AXFYOhI+b8xyrd9R/btwhGOyHe8iaRkYDwEzk4yxAZuGY3/RmGGHYnyEf/2nTrUePW/hsPElViyLUY=; 20:hF0xikAJakweCja9dxab/9DEKsa0hGCWXaUoeP0i8+W9dJ0EKG2XzM9AT1ZDss4JGlI5v2WCziiMK6hVYK43tvJKMV8zNg6idJDRtKO3RJ1wQtugLXuc/8uRO8dC3/tJBwWS+4AavnnDwdiIlKcdRW2oXP9KvVA5xC3o0F8w5X829Ox1L/7dNI3PZzTPewuhze5ybnk6GoWdIDKCbbhlRRMMDp2lljUZbbGc8py/zu5TfB5WJTEstw9wVmRiWyVvgpX79Owxkb6kqNVR9eAloVC7u2ZLb8acz3eMAH2H9n+vWq9VmBXs2d1fy7lf+E5TLzcfEKyTWsjjx+ebZ5G+VcbrCUUSsFZ3L8PaCOTR72Ui8D2D42jZoCS/WV7IHhnFEV2QdLOe4HVMxrIAulvij59KsEiupdiQHmZB6iQquZ2TrFFveWh5/wPPCvwD7vdeHsg85+ptDTixzHKi98icrgwOCZhW/7M1uVF4JZY3jUrQcKk6iHEXM3qLpbKypnrZ 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)(8121501046)(5005006)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1141; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzQ6d2JnTVlZcUg3QWM3dVgwNnlqbFNqWjdJbkI1?= =?utf-8?B?TTVlWXlneHlGaENuL3Y0R2lUdU9HdmRWNWM2c1k4dzgzYWFKWXhJcWJGajg4?= =?utf-8?B?TGVjTDUxelJadTZXMmtBbzJpUkYzVS9PcUFQSzBzazNiRElRbUNLMkd3bnBa?= =?utf-8?B?WWpFQ1czdzBIMEdLOXdmK0h2Wno5aTB0Z2FNQ2VrUjlQNzRCR3pKQ0xBNVJ0?= =?utf-8?B?WXlZVW1BNldqZm5wMjN5Sy9yYit3eXByc1NyZHJzQlNjbW9qbTNnNGltdEdx?= =?utf-8?B?c3pmYzlmRm9PU0d4UGpsblNDbWNydUFvTnZBUW5yNElMM3hJdFlPTDBYY21p?= =?utf-8?B?YnFmbnE0enJHS1dBOTc1S2ttbEdLdjQzYzB5MnV3NFZ5ZjlVbGdMYTBBQmdV?= =?utf-8?B?L3hvM2c1NUltYVZ3WURNZDNTSlR6SmEwL01uTWUwb016cDBDbVBFNUNydE1j?= =?utf-8?B?VS9tcmdFNEREMmN6SXBWSFFaWkpieGdpOG9xbE15d2hIZVF6NVBwTm1pUWY1?= =?utf-8?B?M0I1Zlc2R3BKWjlwTm1BcWVQQTRlVStFNkhYdURCY3BjRHBKM3V4R3AyVm9p?= =?utf-8?B?dHNvVE1LTXU5OE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RL2d0dEIxMzZz?= =?utf-8?B?MkJqTTBxcmpkdHdjWFEyQ3h1Z3p5WVh3VGF5R0x4UHNIWjA4elpPRzBMNVp5?= =?utf-8?B?bFYvL01qaTAzcDgxRFFYNFpNckhWaXJuWXhIVmZuT3E2VkZTNFVaMnZ6c20w?= =?utf-8?Q?EwyWcp+ENhog4paMLPp?= X-Forefront-PRVS: 0340850FCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39410400002)(39860400002)(39400400002)(39840400002)(39450400003)(2906002)(23676002)(33646002)(103116003)(2950100002)(230700001)(6666003)(9686003)(66066001)(3846002)(6116002)(47776003)(72206003)(53936002)(42186005)(53416004)(55016002)(50466002)(7406005)(54906002)(7416002)(38730400002)(110136004)(478600001)(8676002)(81166006)(86362001)(76176999)(6506006)(50986999)(305945005)(54356999)(4001350100001)(1076002)(5660300001)(7736002)(4326008)(83506001)(25786009)(189998001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1141; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzIzOk1CNXkya0ppS1o3ZWFjNVRvdnp6bXEyeDY1?= =?utf-8?B?dGw5Qi96N3d2alA1K2R2UUZ2MHdCZG1IV0pqdXhUNjNwU3pBZWJGeUcvUDAx?= =?utf-8?B?R3N2TEN2UDdaYll0WHAzM2lpb0x3RVROWnVvRzZ2STJlMkRkcHlJOWZmWHY3?= =?utf-8?B?Y1hjUHcreUNhOC9VVThFanoxZTlwbmVWeDNLQXd0aDFiVzE4bW5UVTNZZThq?= =?utf-8?B?VS9wQVRHdUtSUW50aTZ6b1R0clhISEVQWEhlM2twSFlsY3ZCay9OTDVrakxw?= =?utf-8?B?dmRpc25jVVYrSjhvQWJRVkVpbjB5czBNNkFtOEdCQkN4MCtuS0lQeEloUVps?= =?utf-8?B?N1R5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?utf-8?B?dTM4aDJEbk1aUEhEWURiYnh6NHhFcFlBVWZGeU1ybUdLL3Zib1A4RnROVzNF?= =?utf-8?Q?KdvZoER?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 5:OebrXhdnZX7JXHjCGokTCLCuZGsou7gWaxxg+c9Isi+44pu7P5F18vIu3q+a3Mmc81QQCUNa9UCqDWrwg3H+1ash7NF/cGONiEzgJMp5IoVbH5h9N3ex1Tfb8LBg0DGpNbD0hKjFhD2qny9bqKAvoOvd1HeKcJvY8ufAwAXATBrBQkwFafNiUvE8/+hy90Kn6MNPFcaQD7xH687GITr+q9kEGb3/Te55cgFS5fhsFTC/La2dz3QR8TH+mWXqgtHfMDhcvXYIuIKRNhRhhuPLVQCJrM/EtIIVi2XDaWxq222WKAliYWAkn8MMs8ghY2YGZBlqwltJOUTknna3kZfRmYP/AxP80mhc3vyHNAjnvx00rKGKX8Uo3hrEK8MqEOIW6GqVk63F0USXs/qbe3bE/oWqnVyibmulBDdKAkFkwefS9/jiFG202Al0obhubLvqZyXAwy2Y62z0zQvqSWiWHz3nB2D5JU2fKPNFbcO3kL/TnyVaT3LIOM99x7etsqYj; 24:aHQEY+OiepFuZoexYW8qU7ln/2JReB3jGyp0E3KhYENagwd+kQaw5RqEAy7w2R8L2qJkie9N4EyoX0AlowCj03KPE4rk/EYq5F5OOKT3GFw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 7:AdEI30VM5zQTnMr8EUpxx9rewbggzUy49iRA1CYtdjdlocXL7TzKDoo02iaXtSq3tVtlMVpLJs/UdplvzBpfTB+R359gi0LyY/rzXozaCfa9lZqFhnb3mugZCIoaJrl82CPHQdB/qcNckNki4YyvmiIpdZ2Kpqd741Dvs6jAz9LmP+s97yQsKpJQ31M0nu4Ys9EcG+f/wpcXJt2vHSD54B7nZ4t9OxtFJuvqyVMMfniRY3PDGaMGH36K/aZ6PN9so/VVKj/W/+GeHYjraPLXmOiPHiroU06UbvwTQbsSNXPGjmWI/p8mFNmrh7oiBELAX4GbtKKTmpBgp4TIH/6vdsQA44FaRInxjijI0FuvekmDOvtx9Udn7WB4RG6Um8nXNXU2gX26XwOoFuKGAsJGxcS19B5PkN4QnWRmFsCKyMWORG7Q54+BPK6Yil6HrtJqYEd3DLjXojq+YFy7vI6AZXDPop+Z6JVSCnwUKlGBYNcA4fcRGfbjyXnT9u7Hz3ZBQVCC/JD09i1jjJDqwpzn0f7TPHKu5KJ0L2ckQCMQcRSN8xl7hPw1AKlTKljOn+zMUMrEOcOO7N4E7cJ62A9Qy5dhCYKv+koeRY3CnvArSV4dzTXCKyCtMkBZoQk49UfODvJZjO4ICmUcVQ7cMBhlTJPEGyESn/UdDuL1E5nsk/xEkel+sajfJ//pjytfvlQPljLdtClMIEJxJRimAfgvwt8RDxhv+MHK82yPTXRsubw9igxdCRH6M1U9OypAdmROGsnjuV39EcphryXoP+pSmeyTS06WGFO4Pkbx1seu8xA= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 20:Gus3aqjeE3w+gpAiUopuwp9LpsI3qFuCR0iWn99yi0hELjRm04lT1Bdyh99GdfDEPPdh9SbcOXbz9AnxiYhrR7REkdWs4gfJLXVRSAWaBgW/oQYgkqr94jJ0qzVHnQQcCSFCiQGqhL5yUa87z3xZ9dS1+tjXECyM5B/dWVoADw3FFT8AsU+R49nlsDaarOFAwZy0GeKvvz7JpYg9Z9I7dtRRhpokLVVKse3XQemd7lYxDg7doIHqf6b1hsyA7KDF X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2017 18:54:39.0074 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 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 25/36] swiotlb: Add warnings for use of bounce buffers with SME 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 warnings to let the user know when bounce buffers are being used for DMA when SME is active. Since the bounce buffers are not in encrypted memory, these notifications are to allow the user to determine some appropriate action - if necessary. Actions can range from utilizing an IOMMU, replacing the device with another device that can support 64-bit DMA, ignoring the message if the device isn't used much, etc. Signed-off-by: Tom Lendacky --- include/linux/dma-mapping.h | 11 +++++++++++ include/linux/mem_encrypt.h | 8 ++++++++ lib/swiotlb.c | 3 +++ 3 files changed, 22 insertions(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 4f3eece..ee2307e 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -10,6 +10,7 @@ #include #include #include +#include /** * List of possible attributes associated with a DMA mapping. The semantics @@ -577,6 +578,11 @@ static inline int dma_set_mask(struct device *dev, u64 mask) if (!dev->dma_mask || !dma_supported(dev, mask)) return -EIO; + + /* Since mask is unsigned, this can only be true if SME is active */ + if (mask < sme_dma_mask()) + dev_warn(dev, "SME is active, device will require DMA bounce buffers\n"); + *dev->dma_mask = mask; return 0; } @@ -596,6 +602,11 @@ static inline int dma_set_coherent_mask(struct device *dev, u64 mask) { if (!dma_supported(dev, mask)) return -EIO; + + /* Since mask is unsigned, this can only be true if SME is active */ + if (mask < sme_dma_mask()) + dev_warn(dev, "SME is active, device will require DMA bounce buffers\n"); + dev->coherent_dma_mask = mask; return 0; } diff --git a/include/linux/mem_encrypt.h b/include/linux/mem_encrypt.h index 837c66b..2168002 100644 --- a/include/linux/mem_encrypt.h +++ b/include/linux/mem_encrypt.h @@ -30,6 +30,14 @@ static inline bool sme_active(void) return !!sme_me_mask; } +static inline u64 sme_dma_mask(void) +{ + if (!sme_me_mask) + return 0ULL; + + return ((u64)sme_me_mask << 1) - 1; +} + /* * The __sme_set() and __sme_clr() macros are useful for adding or removing * the encryption mask from a value (e.g. when dealing with pagetable diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 04ac91a..8c6c83e 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -507,6 +507,9 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, if (no_iotlb_memory) panic("Can not allocate SWIOTLB buffer earlier and can't now provide you with the DMA bounce buffer"); + if (sme_active()) + pr_warn_once("SME is active and system is using DMA bounce buffers\n"); + mask = dma_get_seg_boundary(hwdev); tbl_dma_addr &= mask;