Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751944AbdFHXEU (ORCPT ); Thu, 8 Jun 2017 19:04:20 -0400 Received: from mail-bl2nam02on0086.outbound.protection.outlook.com ([104.47.38.86]:1216 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751660AbdFHXEO (ORCPT ); Thu, 8 Jun 2017 19:04:14 -0400 Authentication-Results: google.com; dkim=none (message not signed) header.d=none;google.com; dmarc=none action=none header.from=amd.com; Subject: Re: [PATCH v6 25/34] swiotlb: Add warnings for use of bounce buffers with SME To: Christoph Hellwig Cc: 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, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Rik van Riel , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Toshimitsu Kani , Arnd Bergmann , Jonathan Corbet , Matt Fleming , "Michael S. Tsirkin" , Joerg Roedel , Konrad Rzeszutek Wilk , Paolo Bonzini , Larry Woodman , Brijesh Singh , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Andrey Ryabinin , Alexander Potapenko , Dave Young , Thomas Gleixner , Dmitry Vyukov References: <20170607191309.28645.15241.stgit@tlendack-t1.amdoffice.net> <20170607191732.28645.42876.stgit@tlendack-t1.amdoffice.net> <20170608075829.GA2446@infradead.org> From: Tom Lendacky Message-ID: <8d78db0c-7c3e-9304-7d04-31095246ec83@amd.com> Date: Thu, 8 Jun 2017 18:04:03 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170608075829.GA2446@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: MWHPR12CA0031.namprd12.prod.outlook.com (10.172.49.17) To DM5PR12MB1146.namprd12.prod.outlook.com (10.168.236.141) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM5PR12MB1146: X-MS-Office365-Filtering-Correlation-Id: c4a69307-6010-42e3-03d5-08d4aec2acb1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081)(201703131423075)(201703031133081);SRVR:DM5PR12MB1146; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1146;3:c+ONYUW8QDY3xDIIFeOQUKRat4SGtrvd0VwQnNC9StNUeFGtBXFywGnjHZ1rTjzL+NtyU8p2liQzZTnvHtwtI4jrTCOAlmKdanroWKW/W1VcvARyVfKk0EbXncO0gL8BgJ7VHGhx3JZpX22hKQUn/pu1k0mhRIMhjJ16Aptw5aRjGYIMM6U80xx3npQ/fp/dFa+mu+6EN76tMP3dRVPa5/bW5GResOr14YC8PAzAWQfM4lYgYzUx9SfuxGsiYEKbxJ4P0HNymuSuPAXqqgywD7GT9YtAPQcoZ7uyM/DhR+uNGMhTb8eU/DqYKl+9+Uka1AssijRutZtAuBGysZGGP+1cQGWQEo0EUn0836rS6II=;25:0oEC2s5AaV6AsHO8C73M4UfIb/1ADZDkfwOSuNbJjydQMhdRqpk1Se8DCatb9noxdw85K+lOc2aXqAmi/w4SdsaaqGhpwTr4kBt9xcVf0TkDGL500XPcoHRO2uqHnJuK5iMSa4G+XrOvRtPe27rlBIjIPfaBdOj9cyg5c/WiES3d0NOP04Ue/J1js57Bpkc+RRjPf/MXp/04KhpUmpIwi4b85S6MTd0IuhMa3WKGRePbF9yB1un2+LCTdZKBaIdvF1+O5oSdQKTgKhYvUaGvmOfhvZqt78XG5xIDb2yyxwq6VxUZSVhRR8GqTwkHsQQLNJr+eaGeHXb6wPkfVFUPvDfAwO7r5pfyR+znTU386+tYjfGtL+MjjrlUDlZSv1W7w0bVN9q1U9shNAOr3teMQLJK6TyVWipFvZwZcolzU7yBTtUeVSyk5ZVk4Vul8qhqZ1NIPmNpPfl5hFjJXwOHQ/fuyWXHZ9PrD0KWIoEADac= X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1146;31:B/A9vXYjozBiSzyA7XiZ2a2KjSoAeydrm4EwiTmQ7LS2FiCgM5XVL0YC85xyUlhwQJWrtzW+4XA4JtjQGSBpXQyaaChdixbi67pfThVBFgumn+JFMBN88bDQi9fAsf946rKlk0I7CDRUcAXeydMvY3hWesqq2ybubg/F/xwz9SUKgHDRAF03kTVtmIRc7a8XGhSLhsB3UN6J86lA3CsPEG5oh1K7p/Jedhqs1CAKts0=;20:Wen7Ts+2nrlBtRBJLlNbbg9U6nKSq6nz7XBdRdkhSmmq1liaRKgxHxDQ4lsNpFylZXrHGhVbbCgKR11iakykJ8LZoXuCe+LWjvr7L9p6kd5MyMIFnzQPSjcYEQi1vwNLOqDTZ3qS1vOcIAHAE2RSfk1Z5WTRGNA5GLYBALY4K9jLPktUF0IWHiIbT9uctPJHn835nQUcBbsV4lfUH+mPGshI49eeOILDFpqd2+bu80+jOlUFNkhg/PcmiLkfRxrSCPjypcfrc36CN616vOe5FIqO9wc/l5MVtehs2r4aDz9pwCmS5wXyWElMW3ZwoyluZTB/kyNUtJFBk1E76nA9/dNDiYkWj4kRroQGLnnx093cBjYasO1sMZ14cipcuIijp+K7b17e5G6kiDbGLMiGab72mcCwVUoho1KCSG4++sBeDqrx7SHl4IoP+nR056RFQ90q8QgWzyUdbSFVhIgCeXKwN7Ia/FR8/JIgv3UYK/eh9AwiuYBx35UaZkf9yjpl X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123564025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(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?MTtETTVQUjEyTUIxMTQ2OzQ6NXRweTFKOE84NUdzbGgwbkJyemFHN29WWk95?= =?utf-8?B?U0xMQWlnSFhIMi9YNSt4K2dTTngvbUlpK210blFZN2pzTGlvQWhrK1NsU09K?= =?utf-8?B?K3p5bFF2KzdXdkNXUjIzVGZ5enAvbit3ekhCaEZHMFpvYTdQYnp6VXJsZmdW?= =?utf-8?B?bXF6c0poLzRJNXdYdG9yQXdqUDJVbllQU3lOejhZTnBDZS9BRWxuYWl0TDVM?= =?utf-8?B?MnQ5cEtVb3NqbUhQaEhvZm9DVWRoZksyYmp3V3J4UWhhRXN2OHFESGdDU2Ev?= =?utf-8?B?NXBOTDZLV05wcExGSi94ZUlpbmExKzd6d0hrNVQ1OC9tcUZJb25sd2pTUUQ4?= =?utf-8?B?dmllZDhZUEtWUXIxazd1d0Q1c3RpNVVQREZNVENyUml2TGhsdStzdGhRb0dP?= =?utf-8?B?VGNXSFZVNWFKWUl6S0RWMXNPVnB4dGpCcUxpRTVwWkJ2ekJoNDFUSXIzWDRP?= =?utf-8?B?WEVpbExUS0dBUGcxdFlvZlBnVU9pcXAwb1VWUEMzWHlhaW9nelozRloxUmk4?= =?utf-8?B?bE5JZkpPTGk0akoxRG1CS1lBbTVHLzNXanlsZjNyemJmaDRpNkowQkYwa2U0?= =?utf-8?B?S3lWOURBTWNCcXFUWmEwNGZJM21FZ2k0a2tsN09MTWJ3bjFlcEdyWXF4RE5q?= =?utf-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k1h?= =?utf-8?B?eW9YZ0N1UHJ0YTc3WGdDRDJVbkJHbHlyd3ZNVlV2MjVwRE5mNkZMZWlqNlpD?= =?utf-8?Q?vaCEmhZkEo8E1wpUUOr?= X-Forefront-PRVS: 0332AACBC3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(39860400002)(39840400002)(39400400002)(39410400002)(39850400002)(39450400003)(377454003)(24454002)(57704003)(2950100002)(6666003)(6916009)(110136004)(6246003)(77096006)(38730400002)(23676002)(8676002)(64126003)(229853002)(33646002)(81166006)(6486002)(42186005)(31686004)(90366009)(54906002)(4326008)(53936002)(31696002)(7406005)(230700001)(72206003)(3846002)(86362001)(54356999)(478600001)(3260700006)(36756003)(53546009)(5660300001)(7416002)(7736002)(305945005)(25786009)(50986999)(65826007)(2906002)(65806001)(66066001)(65956001)(189998001)(76176999)(47776003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1146;H:[10.236.64.250];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ2OzIzOjdkbFVtYW9vQTY4MVdRQ00zVzdCNVNnVEpJ?= =?utf-8?B?Skh1WUFIOUhsYUlURHQzWmoxMUZoZ29NNmJJQ3YzSGwzRjY3cEUvcUE2aUw1?= =?utf-8?B?UDFITE5UeUJsTmZVUzk0Y1ppWHNlaUg4QlgzbDFJTkFwVlVPMks2aFIrVVZO?= =?utf-8?B?S3lUdzlocVFVS1RFd3pKSE4zcW5yTTBmYmlkWk54Yk1HcjIwVm4yaU5OSTRM?= =?utf-8?B?YlJta2ZCK1FJNTdRUVdTRHhCdTFQZm1uYnMwOEh6dkxkcDdIRys1eEI0Y1Nr?= =?utf-8?B?Sk13TXppMS9oM0NiQW5OZVVjd3ZFNlFycHpVd1NSKytWa1QvQkxqMjhQUWZ3?= =?utf-8?B?QWlEQW1FRzBuYTYvSmwxdG5ETG1mRVNYUEdYcl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QE5iGPZHUpkqpsBUGmr4j8YxgUNV4Cd/9U/A3EdDzoPjxN6sRRp4CCEWhAKeNz614P9hC91uE6PeokVGSdLIT10rYRr7jMdgldU56aJtZ9WVUa/86RmfDw9tucA6aJALLkxvQkMZ3nOK+2Egn8CP7ueBg8J527QlmWLeOXqMvOR6Z1GFcIvxzTD6l/FGcDtSd5QUJfQPNicX2Z/wr8W5nRYSe7tzWMiV50DP4Cw67R89OVt7o= X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1146;5:DBz2rAkcRXiU6ma0JE8Jcz0VfrsvH059XL4qQd2Ua71rxh8e/b2CrBl828rLMkzJonLymuJRh/eFxoCH9lLhsQPgQ+JQW+BYoa2asOcJA4/PJdsdbBGZttg6bh7V0dqd9kQiIjVbu3UrswFhnBPccgDL+1vsIdfSPpIyxf2w+DaeH9dK+PoQrCIe17c+WUix8Oz8VOYZuvlqE4w1D2NI2cF7xE6xYRhRvuzwN/eaautAewsUaHjgtLDDskrWm7ExPVr057ElnnfAKOTscIUlzzPGvcG/McTzeP9yom0zOit/0Cvjpae6wKfzNkwK46ry/ErNMzZ91S0JC7L/jN5iBxUb8P4/xlxtrQOgnQ5dEV+2XEbGeLa1UZRhgp+Oe6FxdI3qgCr9Ysufu/XVrmpjDyFXPz18SjI052cTCGozuJ9oIa2z9gw7NzTm7IyDM3f0mryeSerknYPLYkjjuCQm0z6hctPKdwxCxxJCbrcQgkVLv9wife5waxCw0N956KZO;24:xu158h8Ned7UryWc1r7j7a0pcAY/R+AHaZ4JyxjpwZgUQHp/cGF+u61cSW2IOtpQSmuUxRuK0qsq0PbFNvqzAszZO9wy9+13Vm3R/v7zlns= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1146;7:RCpTzknfj1ij9D0fEhiUKG+4EMbnZBqFcPS2SSoaZylxUAtHKorNWh1OR/x//AcrWVGvtd7NvKtie1OTxatXHHbCzBDiJJxm+oy81xxuFLRfKiYQ6RRoU4Lfb7qBtriVgk6buJ1eWhqol3FO+D4Hbe0V4tEjknI+wTq8h0JzmF13kY+fxol+CdzVlerWTyJ7D8+VqwKPIjVboccqfUshoPuvKxxpNsi+Umj5oUvdX5aT/ifjV6x6ZYe7U8weRPM9BhqK339Yqwj9MzTVg/+yccmDUtVqMU2jHpXiFUtJTqNb5OCuqs/6y4X2WKTwjEWHVBglMKbJ3Adribs+EgqbCQ==;20:DuRPWT/JSqpycja4942+7iokrbGWy8Ga7Kv51Lw8HAAXo+Yc7RvbePWLWKdFv8NkUY358nySHA/e3QLN8Ig6zmKVMmPt7uoRCFwZfz6PqUXNC1C5MrdKABBrRFJvpKP9h+hYV8fkPNmD/a2aEVSIipHBuTsw9U8wplBtDABEf/itYsdu2C//MnA6XMGcwBGVequV3qm5JfoVTJ8/33+bgtk3XtCSH4L8ik9sW4DmBo1iPv+6vohq3dMpeesZ1kj2 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2017 23:04:07.3221 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1146 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 829 Lines: 21 On 6/8/2017 2:58 AM, Christoph Hellwig wrote: > On Wed, Jun 07, 2017 at 02:17:32PM -0500, Tom Lendacky wrote: >> 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. > > And what would the action be? Do we need a boot or other option to > disallow this fallback for people who care deeply? The action could be to enable the IOMMU so that lower DMA addresses are used, or to replace the device with one that supports 64-bit DMA or, if the device is not used much, you could just ignore it. I'm not sure we need an option to disallow the fallback. Are you thinking along the lines of disabling the device? Thanks, Tom >