Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752167AbdFNTjH (ORCPT ); Wed, 14 Jun 2017 15:39:07 -0400 Received: from mail-bl2nam02on0064.outbound.protection.outlook.com ([104.47.38.64]:17632 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751665AbdFNTjD (ORCPT ); Wed, 14 Jun 2017 15:39:03 -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 24/34] x86, swiotlb: Add memory encryption support To: Borislav Petkov 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 , Andy Lutomirski , "H. Peter Anvin" , Andrey Ryabinin , Alexander Potapenko , Dave Young , Thomas Gleixner , Dmitry Vyukov References: <20170607191309.28645.15241.stgit@tlendack-t1.amdoffice.net> <20170607191721.28645.96519.stgit@tlendack-t1.amdoffice.net> <20170614164553.jwcfgugpizz5pc2e@pd.tnic> From: Tom Lendacky Message-ID: Date: Wed, 14 Jun 2017 14:38:48 -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: <20170614164553.jwcfgugpizz5pc2e@pd.tnic> 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: MWHPR14CA0021.namprd14.prod.outlook.com (10.173.227.31) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PR12MB1141: X-MS-Office365-Filtering-Correlation-Id: e819fc30-05f9-44fd-1e5f-08d4b35cfebe 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:K4YlyhFQSIG9ZUxMTW540mCbytqFG+6m+H7ikZrndqvtA7RgY7ZBfp4ZB51sQQ48sPzqvvozSt5cZmRyDxSJDbubuLT/a7X4d5ALQprV062lG0V4yLTqXoHq8vTV/rMQE++l+DfsIRYfXC0OqIFqEE/jfzwmm3WL8XZmn6LfoLa88KLi4chdvET0woR6w/6zS8enKOLSdh300JApYI/qevADg8qWgdlJV8nNDiJc0TyO+1ZZyfs0KZomlyReToxamJhiJs3USFskxfTyHt3T7NSxjXKymshCZ4obff4YPUP1tm+PlmQIzLQ8H0PPyiHai6xlgNwW+Hgg1dVOXpXz+oZiLlxAjNtUvYID/Z4xqzY=;25:niGbpMLMYbpceJmFddPqdvsceilSA6pPR3J72IYFH63gqmGdt003FJp23j1UdxLw3wnAP7sY2j3PTGT8VS7RDi+RDEDJu0cHHFi3i9foyQvMdVGOfLDxI5Hft3iHHQiHfNiJHujy6cmlBM9cxKzXRK/2IRiHeyvMR1yjm5ilwQ3yCmoZv9xdW1sq3yic3iWifmq+LPY8mDw28/1nmAjlGctQW3LMESN5o8xvJPPoohz9LgMYM5ou9CItEXF9bPQwC/hHKg36tYMwnK8S0rsEefnbuoAluKu9FGd4Pm5n4G6x0WPkZYvtYgn/+SJwTEQUgPFQ+HPRgmdgJRCvzzKPhGCrEZCmikS2H5WP2AngolEQdQgzDQspkmFrClLAkLF6eB3Xwz9dsJLJYROM2tXn71ggTTJp+XFhXilDFGSe4ySKsDE+EGnRIQUNuybIQrmpdvvmqsBPo1qQx/VhCp89H/0IO5TseI8evOjeTyaJAx4= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1141;31:7lwibQHqDlsDreJtrYsIlO6vbspQnoYlQ5Y587Gm8qNc2xysdC4VBvPNHVvaMovauAqfs4n3xp9yFdOgkdIF/J8UTbuiqaOfIyu+kuyUCF7TPOJaZRORhfQmsxN8S4rNeauiSTUxYiLRd81qk1FOanAVorMcMHCDYOUwzVlKVn4ZUSdn8wkEOaLKBov3yk7UHtLX6qwGToYTubkunsaekE0keapYJl4L9yFks92TWdk=;20:9ZyCqq8jipBVESrlX28TWbvjPre7Pq0KH+Hiez8YS3E8Ek1SmFBjOFBPF/No8Hl3dLwaAY9C/B++fcgtoQpJz5hpOKS+Wt7WM1ORxAyyA3BiV5Dy7a+KhRp1foDu1S8sXabW2hNW8MvLZgeYlRRTWOZIJyRjZPhvnHD7zH1UaecXjd+NCtHTJbPqjGCqopnOz7LrNzIwUi2ygLpC34xcClkBFpxq7zRplZiweLpMxmz6YXlrOZlWus3bf2qAd8eGRealEWxrClH/EqVXEu5P+nyEZtyXYXotIW+nJyu57vguOe1r/JteIGYbHVYb83j1pl5kiUXIxAbo7DvJXSDfdWWevPka5MSJ803macgFaoIdawupXxIelxWcjLsqDlo49i0BcykHj+qES5eVhuzi5ydso+lMhN57MSuHHbtXzCkAZ4MjrRCnTgagtQsqBT0FlRCXJb274Ytkh0LqL3KXugJya50EX95T1c7xZprC48Zc+RkaPJ+gEB2FLtkVtYnJ 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)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(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?MTtDWTRQUjEyTUIxMTQxOzQ6NnludzUzOFpTV1Fod3daQkd1N3R1T01wM0dG?= =?utf-8?B?amQ0aXh6UEt0T1AwWlRiVlIwczhmRGxRQmtRV09PVUZZNXV0RzROZFBneFNY?= =?utf-8?B?YVlsNGY0WWE5TWdqYWpxUDRGMXkzVkJmbnhvS1hXYzkwdGJaRGdZNG9vY3Vs?= =?utf-8?B?VUhzRmUzNmsxTFl4WjllbDZVUnc0Q0JCSHVLakhrYXY0c0phUHovUHlueFFn?= =?utf-8?B?OUFnMW1pSzJaenZpdFZSTURrdFVPeVR0M1pYOUxFN1NDR1RUWit2U3Y4Wnow?= =?utf-8?B?VHY2OXVMRUhnZEVlNHE3SDNiUm9xS1dWS2k3aU9qNFVrcTZtbWdWNHF2TERW?= =?utf-8?B?N2JnWXZ0Wnk1dzJtNlc0c2k4RDhGeTZkMVpCVzk2UUpwUVBNdW9Ic3Vrb0xF?= =?utf-8?B?eTJuRjJwZzRoV0N2cVBYaWdkMTNHaldmY3hmQ3I1eFlKcHZLNDZwTGw1WnA2?= =?utf-8?B?VzJpeHh6eTNmYUhqT1VDTnNYMDJyVVJ0STNWcWpCUjRhSnJpWU1XQlFlVWpT?= =?utf-8?B?RENFTzBoUkJvdisyL2pVcXVnWWtIU0NIRGJjSTQ2T2hXdXpEeHoyR3QyY3lT?= =?utf-8?B?Zmw4L1NRMytweHJqT2k4ei96cjhpOUthWjFRYVhUSE0wcXA5RnlTY3cyeWRU?= =?utf-8?B?OU5zL1EreE12b1pWY2lpS0YwTWRQVEJt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hWG12YkxUMUl0SU9LWGdGdFJ2em9BWnhscmtIOFoy?= =?utf-8?Q?K7NB51lXC3lSVd4IbNi?= X-Forefront-PRVS: 033857D0BD X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(39850400002)(39400400002)(39860400002)(39410400002)(39840400002)(39450400003)(24454002)(377454003)(305945005)(478600001)(7416002)(7736002)(5660300001)(230700001)(3846002)(72206003)(33646002)(8676002)(65826007)(81166006)(42186005)(66066001)(6116002)(65956001)(47776003)(6666003)(83506001)(110136004)(6916009)(38730400002)(25786009)(53546009)(4326008)(6246003)(3260700006)(54356999)(2950100002)(76176999)(2906002)(77096006)(6486002)(189998001)(86362001)(90366009)(229853002)(23676002)(36756003)(31696002)(4001350100001)(50466002)(53936002)(50986999);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1141;H:[10.236.64.250];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzIzOnJRNEFIWEtQZjl0K1lxS3lxaTRwblNCL1RD?= =?utf-8?B?VXlWdEZ1TmdBNnhUeGNwWjI0dzBwR2I2VE9QUUZjUXQ5WkVPT281c1hOOXNK?= =?utf-8?B?bGkyM1NrS0dITHA4MzFEU2lOYjYzbmZVOVpNYjN0QXBaM2xkK2hkcUZLOWh4?= =?utf-8?B?bHgxNnhGK2pnb3U5RkpJUEJSbm40a2p6eFhkWXhCNW9RQ2x2ZFVRWVdQb1hz?= =?utf-8?B?QWRDdlBJRDBDVDlVeCtkZ0NpeEllNURNbjRtOGZpaEFzNGNaWGNHMCtLWFo0?= =?utf-8?B?MXlvZlNtNkM4RmY4dXBLNUFsMys4a2FJSW9oWEFrSkxKZ3J2YVl3Rkh6TENH?= =?utf-8?B?eTJkUmVab2syaVB1ME4zNGhMc3Ywd0hYTHEzdHkvcGREdHUyWUtsUXkzODhK?= =?utf-8?B?bU5EeU5XYUduU285RFFiQU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28Nb9j6aKBgtcDpRzRrejDQZ8jTrwAVckPuFdRVXc1CNNh/NBXjzcRgj3XfKyVT22yx50kUDvPwOnkn5y1AMA+OGZ3tTFCro85fAir14B3BU7Vd3YVqWFVQg82cwEpCYw= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1141;5:3HXLiN3nddHp5Rp/oBk1mInfG50T8IYV64eBk1fB0aho+1XNBMAS2fgMbrT4J7wQiDJxtpxje6aDKmxDaYEZZoyDdlij2z8FZO9aK85XqW/qoMx6CC7f5jY7hT369dLSrnvIFzCLrFUY+P9yFY0R9OXIXzh5RjwXZU0ye8zvvOC1i3yi1sO4zmSPP7omFcwxnyW7mJW7mYizNWjBdpoAMZn60Ccrfy1lM5sFPrqVdjiguU1jKu6PYIiTfRNhMWg4fe/xJVU6Rgr6W+lVqd3EHYBfzkDWNQKiEObXXNnV2AZtckspZy299AJF9VlX9S17J8zBF5gZM/w1W1pPaC33c6XQP+WJDNJH2bF7miy+CbYIR5Msmc673Nuy8RfH7apfAoJKzui27dhjR25uptwZu/gCKtDAvALzhkLs2eeOGkRlX+dkezECCbhuxxFWBDXiGwMYnBPhuG6DcSAJ0MvXjcP9jFOt6CRc8AubRcV36YcNMeG5qfCN+p43WGNjvICU;24:1+IfoHTnOsPvvYbjmhLEH6a6NcCR1coUH0YPcf2bE3Sgjm+2q5o9VSQO06NxIF/CkRfyuFI6jK4L0/z/vFQdlQgqB0sW+waiikZgIR9g7ts= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1141;7:b+78ncaWctazFuZP2JzmxF/fBbZDyw2GNVLhYzECsRB6j6yk5Fw+O2ai9gR6Rk1xTaS0W7+5wgmCHv+mb8uJ8QAcn7aq+HoT0ocWWo+2YnY8OsplLOK956V5X72i8VznHLC9yCH34V+o6An5OdxAFQbw18Og3bpCIA/OoV6MX5QnEjgFIe0aUNGqBMWjUgCPzpC1jHWrfUvjhxNYEC3MsvXFWFQoXJqe1XnWm/8usVnLoLFvj7PKYSn1ExyOgkUlM1qQxM/sbq50b68JAzg3vT1hhfnBxyz/2Z8K8414M6nyrK7eqCpTxw0dVgj0QT6gh8mAjQy9W+5OXtE/xyj/ww==;20:qegt2TPneLOBgoklXjTMtmiSlz2jRzxWo88MGMWbrpu6hg4hl/tW/7KET1L1WQFeD5UUgVdrPTGvnOnyxEklMkpOnGVlAcJU5nTpUp0GE8qT0mhPUM95HeU2PdqqTUO/90Ei+lr/fy5EFBzkOusWZVICY9nEGDiSToG3gCb51zTaqVItL3qZaG7yUUQmx7yovO0ft9PwotvRn8iDhWq2RcJeUlrfflYon8uYO6x1g/C1PFfqDcrrb8ZwdOoETYtF X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2017 19:38:52.5351 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2222 Lines: 81 On 6/14/2017 11:45 AM, Borislav Petkov wrote: > On Wed, Jun 07, 2017 at 02:17:21PM -0500, Tom Lendacky wrote: >> 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 >> --- > > ... > > >> diff --git a/init/main.c b/init/main.c >> index df58a41..7125b5f 100644 >> --- a/init/main.c >> +++ b/init/main.c >> @@ -488,6 +488,10 @@ void __init __weak thread_stack_cache_init(void) >> } >> #endif >> >> +void __init __weak mem_encrypt_init(void) >> +{ >> +} > > void __init __weak mem_encrypt_init(void) { } > > saves some real estate. Please do that for the rest of the stubs you're > adding, for the next version. Ok, will do. Thanks, Tom > >> + >> /* >> * Set up kernel memory allocators >> */ >> @@ -640,6 +644,15 @@ 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. >> + * This call will mark the bounce buffers as decrypted so >> + * that their usage will not cause "plain-text" data to be >> + * decrypted when accessed. > > s/This call/It/ > >> + */ >> + 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..74d6557 100644 >> --- a/lib/swiotlb.c >> +++ b/lib/swiotlb.c >> @@ -30,6 +30,7 @@ >> #include >> #include >> #include >> +#include >> >> #include >> #include >> @@ -155,6 +156,17 @@ 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) >> +{ >> +} > > As above. >