Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754632AbdGJTu1 (ORCPT ); Mon, 10 Jul 2017 15:50:27 -0400 Received: from mail-cys01nam02on0075.outbound.protection.outlook.com ([104.47.37.75]:41712 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754131AbdGJTuV (ORCPT ); Mon, 10 Jul 2017 15:50:21 -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: Date: Mon, 10 Jul 2017 14:50:13 -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: DM5PR1101CA0011.namprd11.prod.outlook.com (10.174.246.21) To DM5PR12MB1147.namprd12.prod.outlook.com (10.168.236.142) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 850ddf45-d523-4cc8-94cc-08d4c7cce41c 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:DM5PR12MB1147; X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1147;3:mqaWXbmqtrFD/x3AibkQq74CqRdCteVuwcensLKOrCQqoJadVWH1oUt9bu4oXqwl8jE2FyBR0JYqfN78DBkh+4Wzb5wbA4ddKx7QQYDYmf1DkeLtDNOQkEWX/XX5re1qj0byx6NgwVEm/MIu5FGJIEBOoNzuN+ggx3ubEBujxpO4rZ2QYH+SQpqjYzIe0+mHnvJioCFBdMBbwmdf82U5TKxjyLU88gV1IrkcZqGzC3cPvUsdpEtt3dPf49+l95uh8pUCvWD6rg1+NfxhclZ+2iYZg18tik1sBSkLnHu8VK7i5KobxuG7XeHwQp+CXOWgYw8CN3ZV4sppedfmUmt7kXmufTv564Zg5sjc1/K6ttAYZRfJS5+AY+o0MyyfABoYrceXWNG2bGmpGyvWgfTeyO1qvCrQem9PldEQKYhfgXjVRKvhKiJ5gF8wgDQxkKn1+zkoqLmNnyVfWpgycJhS1OjnhPOI16USlaE/OLKrVIez5bZc20Y4v76gCCzytg8nXvAidC6aj/UGDjwP9VigpUno4cfWo6Bv435IgM+AgYMTBBEID8IxvxN+HeSZt1Rr2jaEPBIqhj/d8/s/+oF1J/nByf8txiR/BzVzpOfsub1kHkImi1KFfjafqGtD4IUtvXTr6uDYTNDgL2jg5ObMm7jRUGZ57n/5EtyBk3z/XdhOF4qLtqEgM6Af0L/T2EaiI6gLJUq/aTZuEIS0U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zw3+4SciL2vdOjucLClxbZSpbzeVCZIp5viA5Oq1Nkwx18wWQQON3lmoELMI72rda+KwBSA0vzabV9TZzEfespq74AeZ4nQAEYCWsrr8cYs4IgH2Cq/xwyGDWty9CDjZrnhINhN2ZK7G1fO/LnQZQdFUrJqwh5TJtlQbXiLkNlM8h3VPgCt66pTD49/05tT3SEi95ZwGl5xl9Uj/pXH95dGSaTFw4XnGLtZLbnaRWd7EgSmF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(767451399110); 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)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM5PR12MB1147;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR12MB1147; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjEyTUIxMTQ3OzQ6bmNwSW01UGZaazJoMzZvYi9raXRsemFHdDNy?= =?utf-8?B?SU1IQkdEYmMvMjVGM1JIaXBpbHRBZEVsU0I4bHFrMmVUZiszVlBJUmN0OXpP?= =?utf-8?B?SGJQS2wrd2l5WVpYT2tKYmd0Y0tVajJBR1Jsc3JrRlhoUXdYWUxkVHg1OGIr?= =?utf-8?B?OVdHbTJWWlhXbjdYY0RmYVlTcWxMTWJmTlNEQkZCYlEwK0piM3hMcE1hYmc4?= =?utf-8?B?eXphVjBOWXpNWCtHQzUvT0I3RmtmNWcwY3J3bEthN3pwN3RZOG5MMHc3M2dM?= =?utf-8?B?TG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dDVWTk9pVVVI?= =?utf-8?B?NlNEanV5MWpoMWd2UEU4UDdCTnJNTXQzaDlVNCs5S3hNdUhuS2Q0U0JJZTFH?= =?utf-8?B?ajR3Z0FiMUVORDV3KzJOQXoyMlBYRVJ1UCtvMzRWTGd0eDRlWE84VVprWVBm?= =?utf-8?B?amMxaEJvWnZ2N20yZEFKTURBWXRuLzVVWWg4N29neWpyNlVoOEtpa1ZPV3Ur?= =?utf-8?B?TDRGYzVSekJ3aTBlZXFoaEJVZnZyUGcwbXQ2bk0zcURrVEVwNFVNUEtwdUNI?= =?utf-8?B?cGRSdkpybjM5MGEzZGFqU0FVSHJKMENGMWFDREl3bTkzL0crVmpyRVgvd0gr?= =?utf-8?B?aWNQYzRnZjhIN252VTVyS3E3NGVmc2JMQ1RxVzBPMjdmSFUxZUpIaWQ0VklQ?= =?utf-8?B?STNFWVNJc3Z6OXQwNzJGdW12MlRBekNydG5TY1RvNFVLMG96cHY0SjAwTzBS?= =?utf-8?B?dXBDVytiN0VwMFNCazlLOGV5UmdSbHBiODVyLzZ5UklNVmVZV1Z3VUxNVC9I?= =?utf-8?Q?f+mHyhjqaMoYhf+qwip4sfV766Iwn8sBqhMt/d?= X-Forefront-PRVS: 03648EFF89 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6049001)(6009001)(39410400002)(39400400002)(39840400002)(39860400002)(39450400003)(39850400002)(209900001)(377454003)(24454002)(65826007)(50986999)(81166006)(4001350100001)(6116002)(54356999)(76176999)(3846002)(47776003)(33646002)(8676002)(1411001)(189998001)(229853002)(230700001)(38730400002)(31686004)(5660300001)(77096006)(4326008)(90366009)(7350300001)(110136004)(53936002)(53376002)(6246003)(6486002)(7736002)(42186005)(305945005)(36756003)(6306002)(50466002)(2906002)(53546010)(72206003)(54906002)(25786009)(31696002)(6916009)(83506001)(66066001)(2950100002)(23676002)(478600001)(7416002)(86362001)(3260700006)(65806001)(7406005)(966005)(6666003)(6606295002);DIR:OUT;S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ycKUsS66bAXxpgyKL45+70SwEbo7ob7d0P9sh7kFB2KZ0ZUKX8SuwK/uqjIZCjAo29EiZUDzPn74E/5fq9c5+OahHfu8QnVhTGPeQpPkcIiziWtc4NOEM8mR6KhjD4LK2XWHCc1D9gDCE+AU0sJ5DS67pLNU9ZPOU+ZK0zeqv8meXEktYpXWLdpPT811UAlu5v7b8BHWjdEiHJDTEg5I50Mu4ha0L/Vr51LPCSJDFwvxRaryQBf5pLpBh59CHaaC2QSm2FE0MuMiPJ36II251I//jJC5efFmJ9EgkLyudihHQlOQ2x8eoBstbdUCMGmRNssPLM8cfH47WdQacwvVuV7iS6sTZuP6M5rj5YZiJFtvEzE7fdQVAMfLvMWlK3jVMfEdrvY2nLECIbA7188Azu74RfcsucJTJHMp8spABjhpD+pcZP2zXcex/k9yfjIvdiIgAqDUPlJclZiofmoHT7TA4m6fCcR81K/Vy0AZlqiV2hth6Cd3hjF1dXX0OVCxpDR4YSHv4GhYU4QH3uA1C+6gpUiD24+3qXxhRDeDsGaO3X+rBuqpWrOf6P/M5hA7nCWdc= X-Microsoft-Exchange-Diagnostics: 1;DM5PR12MB1147;20:kMJdhYPSBVp9R/PbktyJYJ0rJh7prDgj0Cpzyz0fV8DNpbiaA5nOWVrmFwnTFMcK8/N2L3kXx5G40V2umofuxqfMkLGOqKxXIZQlOKB/Ca0xxgBYgudG2Y0QYyHXlBOpPUaeskuLNeYzq10FWEeDDMh8BvcAYTlnL3tPuvtntpX3O3uZqLuCEyB0pt2P3UPAi506YqNvFg6b18edOFK91VemaWNVBfHNciq2U3/CvUDoxCAHwHRFKzxGoFcv7+dT X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2017 19:50:16.8541 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1147 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2502 Lines: 66 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 > (provided you follow my recommendations to not set the SME feature bit > on 32-bit even when the processor supports it) > > -- > Brian Gerst >