Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933189AbdGKPCZ (ORCPT ); Tue, 11 Jul 2017 11:02:25 -0400 Received: from mail-bn3nam01on0054.outbound.protection.outlook.com ([104.47.33.54]:63475 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932571AbdGKPCS (ORCPT ); Tue, 11 Jul 2017 11:02:18 -0400 Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=amd.com; Subject: Re: [PATCH v9 07/38] x86/mm: Remove phys_to_virt() usage in ioremap() To: Brian Gerst Cc: linux-arch , linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, the arch/x86 maintainers , kexec@lists.infradead.org, Linux Kernel Mailing List , kasan-dev@googlegroups.com, xen-devel@lists.xen.org, Linux-MM , iommu@lists.linux-foundation.org, Brijesh Singh , Toshimitsu Kani , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , Jonathan Corbet , Joerg Roedel , "Michael S. Tsirkin" , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Konrad Rzeszutek Wilk , Borislav Petkov , Andy Lutomirski , Boris Ostrovsky , Dmitry Vyukov , Juergen Gross , Thomas Gleixner , Paolo Bonzini References: <20170707133804.29711.1616.stgit@tlendack-t1.amdoffice.net> <20170707133925.29711.39301.stgit@tlendack-t1.amdoffice.net> From: Tom Lendacky Message-ID: <81fbf5db-c42f-cfe6-5d31-d60adbd18f26@amd.com> Date: Tue, 11 Jul 2017 10:02:05 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: 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: BN6PR1001CA0028.namprd10.prod.outlook.com (10.174.84.41) To CY4PR12MB1143.namprd12.prod.outlook.com (10.168.164.135) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 65678283-fa85-449d-9271-08d4c86dd158 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY4PR12MB1143; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1143;3:I/rBE934IGWMze/awCXCzLXRM3i9nrs5gRAZg0qHGZpI+OTwMKJfxOBL7nZc20ohygpzEZkGSmn0wM6pAvQOTrfPxsilqXlNvKKGPbNtFxJtg/+TL0NRTsEyTzjmbPJ4eCm9NQHv/Ef2UCkf70DdC5XkU8hXesObsjkVHKki5WV3U6flmBWNGZ5DP06gT/BWB0HoQtbeT5ztmDRdQ0hjuFQia6YNja07FGRzoq2nGkDbCP6Z2ybimqN47TRqBKZqhh37wV+cBZJ2+COp9sM34PS9pQjuYAs/J9/o5nwbOneAaJwbkiCSfI/fu7e7pVES9PxwzVV85Z+hfgdrgMdafvYJOqjLRp+oC+oYQ6Q9dTZKsfqKeQ0XLOqiuWY57t86IdTffeGZH4jAvV2YkK+9CpIPTjPL0MVOuIXFMMLwoKKeSjlrEMujH81kLkze6GcxHOBxoaA7VPcSn7xjuTxDhKVOXsiCGXDns7VH5Yof/mJ7ClgaxV8S2gJWAu635ivTKPdku3afINo+kpJdNNoTejwtZM+pFEMuRJvt3pfRa/9xJWxpTAdi+mP3hgAR6Ynm5nkL8AfC+DtKuS7nglpTV9VM0fUR8bc2ayakd3MMdaCF3qAQ3LmMlgFAa/AGA4H/XB4Haq/R7XO90zwezDBsqjT8zPAQZgoAMGx2d9KI/qAI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L0YJmxGzZIPAPBWs+TWiEWoa1DQW/q/fmknmRaVI4PMGbNtlJ0FuBEVo7w90rP0wtTKXFnxb2cGbAHE/ABXkIi+u0WzCUUFP7uvxF77ZyUMYzO2B1d+TJakSXSRWRU7btgfeQS1r2CQsBjq+U1Ys81WcxaWjQgb6Bo6lyd76ghgl6AjcfXVqoxb/aI7uFgmZsR1Mub1op99KmS2S9AEs7cBNVrb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(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)(2017060910075)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR12MB1143;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR12MB1143; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQzOzQ6SktJOGNpV1hPR0d3dlhLN3orQmdMYm50Skdk?= =?utf-8?B?eHN0T1ZLTmpLMjNjK0V4ZDFhdTN6em9lN294emV6TmUyR3hWSlVEZ3ZPY1Ri?= =?utf-8?B?L2E0YXpwN1pacmZLejBGMU5vQmxIU0kvb0xEdWREQjlIN1pBSkhsQVRZdVRE?= =?utf-8?B?OVZoc1EwZzZMdm9ZdnN3MkdockwvMm9kSWtrVUFvN0E2YVF4V2E2MmhGOHFT?= =?utf-8?B?NllEMjhrdmVlQVdBNjJkaFVGR3Y4N2FFck9nTk5tTjJYNlRIYUk1YUJFSWJE?= =?utf-8?B?cGEydnM4W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poL01X?= =?utf-8?B?cFg2UXJoQVV6Y2VObU9wM0gzak0rMzEwNFIrNTlSZEEyRGdSZlg3N0Q0S1Zp?= =?utf-8?B?UFIvejJvdDdremlCK2luNFE5cEhLTkY5cG5Ucm5jR1Z2K1h0a2lvRGdhdDdl?= =?utf-8?B?a1Q5U2pNRGZhbEhCR040ZnVYRGNKSm5XOCttSkFqS0NpNTRIUjhRYkp1N2Ja?= =?utf-8?B?YUc3Rm9xbHd2TFFuZDB2L2RpSFhvcU1XSXJpNUNpQmJ2M1d2VkJDVGJlVFdl?= =?utf-8?B?VUNkUXFqa1V6Q0dsRFhlcCtRckhZK1o3VTVqYUpiSVE3Q01JbWhKS1hNbzQr?= =?utf-8?B?SDdsT3hwMFgxK3ZrTXhGOWRvNTR5dVplaU9scHdmOGtGMllJeXVsQWlNd2JP?= =?utf-8?B?K2dsamNIcDhxQmFvVW52ekxucmJTckU5ZXZ6YldvQ0JJZjgvZnlCL0ZyRDgw?= =?utf-8?B?bTJDOTZQcTVrc1Q5MC9kWWpWZE85TG4wTDJGTm1ieDR3UmdxODc4WVdpbHp4?= =?utf-8?B?bURHeWd5ZzFHWkhoTzl2VTc3SkUrMEdkZzBUcCtLaHMxUmZraFQ2UDN6QkxR?= =?utf-8?Q?cd/CHyv9+IBUGeFmiPUHj4HJRVDpMwr3hveU=3D?= X-Forefront-PRVS: 0365C0E14B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6049001)(6009001)(39450400003)(39400400002)(39410400002)(39850400002)(39860400002)(39840400002)(209900001)(377454003)(24454002)(31696002)(6306002)(65826007)(478600001)(6666003)(4001350100001)(2950100002)(64126003)(6916009)(230700001)(93886004)(8676002)(36756003)(23676002)(229853002)(2906002)(50466002)(966005)(54906002)(53936002)(86362001)(5660300001)(72206003)(7416002)(76176999)(6486002)(77096006)(50986999)(7406005)(54356999)(83506001)(7736002)(305945005)(6246003)(53546010)(6116002)(3846002)(42186005)(1411001)(81166006)(31686004)(33646002)(25786009)(3260700006)(7350300001)(47776003)(65806001)(66066001)(4326008)(53376002)(110136004)(65956001)(189998001)(38730400002)(6606295002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1143;H:[10.236.64.250];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQzOzIzOm1xbnlzY2NYNm96VXl3YVRJTUNWaGhVd3Nh?= =?utf-8?B?eEViT3Ivc09wZFlYMVFFejBHTFBGelBLU0VhL3pMRjJ6SXVhSm9XMUlwOXU1?= =?utf-8?B?aW1ucTRxQ1Q5ck9VczhQb2sxL1VoVFNkTkFhbzhjWGY1Tm9CeDM1QlVFVlBT?= =?utf-8?B?SkZhdHh6b0FQK2VoMnF4RDdBZWlaNWd5QWI3K0FiM1pncDl0OGdDSWpwbDhI?= =?utf-8?B?VGhiSy9NZFlVS0ZydFlZS29PQXlZbUNyK1dtQnVFQWZQU1FDVDhYQXlwckFV?= =?utf-8?B?M05UdHB0Umo1Y3BjSnRoanRKbWk1V0U0dGQ2bHhZRlZCb1JuQkNHdXh3RWlN?= =?utf-8?B?R0xodnJyMElmM1NmNjFjRzBnOXhGd0hZenVPbzVwaldSczNIaW9oMUtObDFN?= =?utf-8?B?andxUlFOV1YwNmJ2V0w2enZwdkNwSmpqTDRjSlZMNjVXeEVEZkVCck96cUNL?= =?utf-8?B?NEgwK1NvZVUxQ0h3emlWZDZaNEVkNEgwcTZQUGgzZkRwYkNjc0JQRFBYV3R1?= =?utf-8?B?TjVwUGplbkNHMk1JOTc1M2QvVGdWbzUyKzc2YjFLbng3Nmd0NXZEM2FQNEE1?= =?utf-8?B?VnlNYVYrb0ViTUM4R2V5d2ZVUjBuNnJRSUhOVjF4SGdZZ3BjS0FzRy9GYVVI?= =?utf-8?B?UVBteWRaQjdNVWhJZVdGUmhvYmRPWmk0T2NlWkxzelRDYjV0VnhlV1FpV2ll?= =?utf-8?B?NWNnZHp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YjZwb2dpSzJpRitBcXBNb0VD?= =?utf-8?B?dVgzN2oySUh4blFSR3d0THoyRThXYmJUbk1OdUlrL25XZGt1c0ZrL1cxbzV1?= =?utf-8?B?THJsL0pXMW1BOHkySmVJVU92T3ZaMFJocU5UWXlIUUorL1QvVjdkV0VpMVl1?= =?utf-8?B?eXUwUXVoeG9uYStRaktWakNKNTRpeW9DWXlFZ3hoM25FdEllN3U4SkU1MkRC?= =?utf-8?Q?NTszCOp?= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1143;5:nmav+FZrYHqi72m2Qn6zsWYaEyv9Q1VTezPwWjKMQePK14ybjbOGkB52B1jgS1Rkx+P9nopvTz8UVlRbZsCsTUn0pce/VnmbZj8fGnOnUwYUmeFq2/wz01J1YRIYA5U1PO3JihO4rI4ufNWaGK5c1/2m5ITJqdDr9jgS7ftTS5fuGGojOBi6Y9JKNhg2OOr10PEFcByjLnajYt1oQdGzTv140lZ82hYyUvesd4mN2UMMqRL92hbrCslfw3iC3l42omYv3cwLz0PrhoS2LIjb6kOO/yKjR7FyByt/eTiNZHnxEE2v8fpch+/SJXrH/5fSJISdgunws3XIU6FK4K3h6zDb+V7BAhNpuWAQz+Z9jjt+kLXyI0UN4ayS6klY9PL5r+sJTdDKA7SNkMz+7b3BQoSxzGcjV0l3/EiEHsHqzuESQQBpL4ulhUvl3Sr0Qz4zr8cQifuq2OyMpviKyGpa6lsXRC91g0jYTEjbv8oTGD4PW+kuUa7C35GCg+SWvB5M;24:igTiIQcVx3VeIo/9uRRz7jZC1FiwZGw30C2vVYTJFEgHoF20aH2EsTa63u2xrC/oln0iRQ3cnaGpRkUYQd9yWcrH4WarbXEIKhOE1HEZ7ng= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1143;7:R39iNSCnzaep9odZu14+DKOGXU+NcQ0aD+tRkLSWcVKSbT/va+BHI3u1X27OCyVLaCWU20NWHz+iZFN9wSG5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Jul 2017 15:02:09.5195 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1143 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2969 Lines: 81 On 7/10/2017 11:58 PM, Brian Gerst wrote: > On Mon, Jul 10, 2017 at 3:50 PM, Tom Lendacky wrote: >> On 7/8/2017 7:57 AM, Brian Gerst wrote: >>> >>> On Fri, Jul 7, 2017 at 9:39 AM, Tom Lendacky >>> wrote: >>>> >>>> Currently there is a check if the address being mapped is in the ISA >>>> range (is_ISA_range()), and if it is, then phys_to_virt() is used to >>>> perform the mapping. When SME is active, the default is to add pagetable >>>> mappings with the encryption bit set unless specifically overridden. The >>>> resulting pagetable mapping from phys_to_virt() will result in a mapping >>>> that has the encryption bit set. With SME, the use of ioremap() is >>>> intended to generate pagetable mappings that do not have the encryption >>>> bit set through the use of the PAGE_KERNEL_IO protection value. >>>> >>>> Rather than special case the SME scenario, remove the ISA range check and >>>> usage of phys_to_virt() and have ISA range mappings continue through the >>>> remaining ioremap() path. >>>> >>>> Signed-off-by: Tom Lendacky >>>> --- >>>> arch/x86/mm/ioremap.c | 7 +------ >>>> 1 file changed, 1 insertion(+), 6 deletions(-) >>>> >>>> diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c >>>> index 4c1b5fd..bfc3e2d 100644 >>>> --- a/arch/x86/mm/ioremap.c >>>> +++ b/arch/x86/mm/ioremap.c >>>> @@ -13,6 +13,7 @@ >>>> #include >>>> #include >>>> #include >>>> +#include >>>> >>>> #include >>>> #include >>>> @@ -106,12 +107,6 @@ static void __iomem >>>> *__ioremap_caller(resource_size_t phys_addr, >>>> } >>>> >>>> /* >>>> - * Don't remap the low PCI/ISA area, it's always mapped.. >>>> - */ >>>> - if (is_ISA_range(phys_addr, last_addr)) >>>> - return (__force void __iomem *)phys_to_virt(phys_addr); >>>> - >>>> - /* >>>> * Don't allow anybody to remap normal RAM that we're using.. >>>> */ >>>> pfn = phys_addr >> PAGE_SHIFT; >>>> >>> >>> Removing this also affects 32-bit, which is more likely to access >>> legacy devices in this range. Put in a check for SME instead >> >> >> I originally had a check for SME here in a previous version of the >> patch. Thomas Gleixner recommended removing the check so that the code >> path was always exercised regardless of the state of SME in order to >> better detect issues: >> >> http://marc.info/?l=linux-kernel&m=149803067811436&w=2 >> >> Thanks, >> Tom > > Looking a bit closer, this shortcut doesn't set the caching > attributes. So it's probably best to get rid of it anyways. Also > note, there is a corresponding check in iounmap(). Good catch. I'll update the patch to include the removal of the ISA checks in the iounmap() path as well. Thanks, Tom > > -- > Brian Gerst >