From patchwork Mon Jul 17 21:10:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9846277 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 4B52A60392 for ; Mon, 17 Jul 2017 21:25:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8145826E4A for ; Mon, 17 Jul 2017 21:25:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75A1D26E76; Mon, 17 Jul 2017 21:25:49 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA09226E4A for ; Mon, 17 Jul 2017 21:25:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751883AbdGQVZa (ORCPT ); Mon, 17 Jul 2017 17:25:30 -0400 Received: from mail-bn3nam01on0071.outbound.protection.outlook.com ([104.47.33.71]:3344 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751561AbdGQVLU (ORCPT ); Mon, 17 Jul 2017 17:11:20 -0400 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=hbXjoefQufu0W3JQTxS6jVoGltxNNBLvKmucHfu8AKM=; b=lV8TkyhiPQIrVvAtiFkERGMf+POtj+G3LSUpbqsJ/EBSq25gb7Cn4yKSdwXeKDG8vgz3VfD3tBnjv38LTjJPjRo7k3wKpMTLUHDZLjnRu8LeZtpUxRduxpQQRNrRu9fbeN021iLKQG+/t0kFPX/YXGryM+Id7smRMvNDbj88/QA= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=amd.com; Received: from tlendack-t1.amdoffice.net (165.204.77.1) by MWHPR12MB1151.namprd12.prod.outlook.com (10.169.204.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Mon, 17 Jul 2017 21:11:10 +0000 From: Tom Lendacky To: x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, kvm@vger.kernel.org, kasan-dev@googlegroups.com Cc: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Arnd Bergmann , Jonathan Corbet , Matt Fleming , Konrad Rzeszutek Wilk , Andrey Ryabinin , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Paolo Bonzini , Alexander Potapenko , Thomas Gleixner , Dmitry Vyukov , Rik van Riel , Larry Woodman , Dave Young , Toshimitsu Kani , "Michael S. Tsirkin" , Brijesh Singh Subject: [PATCH v10 07/38] x86/mm: Remove phys_to_virt() usage in ioremap() Date: Mon, 17 Jul 2017 16:10:04 -0500 Message-Id: <88ada7b09c6568c61cd696351eb59fb15a82ce1a.1500319216.git.thomas.lendacky@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR03CA0008.namprd03.prod.outlook.com (10.168.230.146) To MWHPR12MB1151.namprd12.prod.outlook.com (10.169.204.15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cb18d62b-c33d-4588-0e77-08d4cd585b75 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHPR12MB1151; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1151; 3:1YBJe0xXX3f0/US8aL7iL0uPk8+GJmGiqKJuoOznWNrBBpC51qdm1IV/TLakPAHTijIouqTR4QexmmGvUnySV/8m8q51bxSSlEVztQhutGGqZVNqvjhbhuGsGf/56hNeS0QOK7fIDYuNkerC3IENxOBdIw/f5F5jVBbc9Rb2XuzUUK637dwFp/blzmsj04qmaf5EAlbbgHaCpR0B/pryLQe4XtGOKkTNPRC+DtqmsKu/I4M0xOcRbyvIvjaKnV073Zr0Vrmnkhfxh6oRO2RE1XgFXtlw4OdOYOb+lH35tsYTBwKPtVHZtv6+qDcsJFA/R3l1rjlbfcOnS6mjreNrSR6ITuvbS1ACnonKeeaxXzJduQ8eTj6two19CFehM/BBsszY9qwZkHokC2hVnN4OrBQ0xYggscvjsg8EdVoqnEiB2gdu+bj17N0VnLRQh1EhVonam1tgBdQI1jSsG0EQQm331WMll8NYSntegzyZwcBhZ4Qnmbiung35AeLbJcwqV/O3tUd39J/tZDLBJSkqwJgp0tH3v4/AUiXiOrvyXSYcHihxfYSRqQdzgnPfVO5idAxlEP5acTRVbFMjCnDnWPo50EK2PFYKqVin3LTPeNKA6kuGQU769cFWUcPUhVp5bYu02RXT2Cp1qPtHYFEvDJLTVICFiVi09bGIrRLpHNuFjJQ54lSSIZykd0tvVdXhajosxLfOleSxY53ZpRFGtFxWDp15PArt1mBN2WDqjpIljkcc4xz6NTunjp+h3eE9XEoJBfl4AHFxWkwligaa5Q== X-MS-TrafficTypeDiagnostic: MWHPR12MB1151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GG17DrzOclH2v2weH93Q0TJIZ5ASeIfnqAnnjRe0SX4ptDguwJ91YvfzN9jO+5AVOyPXNsEE1jXeDPz3mr2pv2OHAeg X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR12MB1151; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR12MB1151; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1151; 4:ysPmIUHu40Dqah2k0KUjnb8zZzh/CTO72nn4KU117+?= =?us-ascii?Q?uYWvr6ul3PiHrzAtgl2FSU79iZD8koXUc4Umcrij69DEZOuuSz0fSowRJJHi?= =?us-ascii?Q?jUmgQr0igEy8Y4xI46puf0PCvRSLyIwqGGmpCsVUY5IgbOFWui50ehcFzGat?= =?us-ascii?Q?s4QuGvBJ0Ce1UtfPFubYUyH44hQE63MDtprh69S/RI+V7HVPx2fvhGKomJEQ?= =?us-ascii?Q?gQzgzd4E91ElvfQNL+zwWT39yaavD+bKhrZIM13fQSckIYwSevhO1idAIRoJ?= =?us-ascii?Q?AqdEVGKI3AXUDZPD5djGupk6Dv0A0n2FK10S7/w3ohLbhCaK9J4SSqQ8zODg?= =?us-ascii?Q?5/oJ0wAKjTXrcorRBhp9zl6X+m0SMAJizBK41IlIMQbSdGOapxckMpEd+eaa?= =?us-ascii?Q?t7dQLnknN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7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39410400002)(39850400002)(39840400002)(39860400002)(39400400002)(39450400003)(25786009)(6506006)(33646002)(54906002)(7416002)(76176999)(478600001)(8676002)(50986999)(6486002)(47776003)(5660300001)(189998001)(42186005)(38730400002)(305945005)(72206003)(53416004)(66066001)(50466002)(48376002)(110136004)(118296001)(2950100002)(81166006)(5003940100001)(3846002)(6666003)(36756003)(53936002)(7350300001)(6512007)(2906002)(7736002)(6116002)(86362001)(4326008)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1151; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR12MB1151; 23:okvRLJtt8TWj77KmcFkekxdRfr8RIQAf379VOPXtl?= =?us-ascii?Q?YX7PVYn+DAUJxqiFa+DwX+zthN6LLB8KnwzWyc4NyaWNdF3Ae77MXKoPTaY5?= =?us-ascii?Q?hQ+dagUAJJBmcPxFY61i6cX9oPigX7ingWOXGh34P0Vn0pj5hS+eMyL7vfAP?= =?us-ascii?Q?7dichzozglgxkWNKESxK+7c6K4mNjXDMFbilW2r7nLIv3hp7SpnoHrgpx57D?= =?us-ascii?Q?T56Z1ZhF0eRcZ8QfRGFU2yynK04dfs71qyvk2QNjW7yuiRDR4jvGN8Ajvq5k?= =?us-ascii?Q?3xHjFefoK0dY8tp/NPAjyGSZpsSZ9NtUd35b3LUBTx0CsAqAIpQYgtP5g+2M?= =?us-ascii?Q?cDupj5P//8OCENvsQPJ0EUd32OE2GaAjO1dUA/nLihlKPs9Ht6CdZ08ybziN?= =?us-ascii?Q?9XhfjhRySVPej1tTGMFlHwKN+feaZ2SuU32vsq/U8bvvgZfnDWjj6LkFxO3l?= =?us-ascii?Q?YvXzmwC1dzdmHoWDptYfv/n5IZ4dPChXBug/d9aRvZ5Gbq3AwFqsZI8ZsOpo?= =?us-ascii?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dT0oD0AX1aTJoC2fGSBmqHNF2SFAil4V5EAheUxpT9gmXgAQ7YjVTeTXuzAUduVo8fXtzN05fdjUXU5pGYqHA4xRUqvCTg5ZPcKmoo45tAvZ3o2+A7zeePZAhH4kS2KBOp1K6/gXbMP6c7DAQ3uZDFeNbgDHe3War2uibeMZ9//YAEFg1OFzcyRMDvI+DvptnZImBkmJIfznDw8zp9+OCYVUNiQOu66FlCghSkn33ccGTd3v6fVvgpsHUTolw8/fsQOH03hVXUyTp8mBHPMQ/57hPTOvkIfU+I/biI3T/3Kp81Ha1WZpZpLWdDxOca148tGgZa18ihKCNo2JAH3yNo2iBV1MaV//iH7Gef5wO6ZRWbGbeDkmXP1EgzQAeBRQsDEUiBMLONsZocnk9GkKdLwIO1l6xokaWqlxl7sSHO0a8j4X4oxUUjMTTOv28qpiNC+woE2xGon5IC6YiJH+OtnYQB3MkRl+aLt7P6mTn3W0= X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1151; 20:uZEKIexPNxLtlx7qkknLmKWs4ZC+OLV8o7ab6PnWyIlVWKGgZQkiDoD6N9uLtwdfHtKwgy9Wn05/kmKR7KXnM8TPMZOJYwBixJs2AHZqzW3lkIM9J3cbdmCUx1tWhJQHFovuB+j3ZY6JKGP+2x5dlO78fZTS8qSKdCv/z/Bhw8++rPEINwdZV5bo04hyHX1/FHtYuUXhhqo6c38GRFhGYObAYaV2RVFgpPHAc0375KqQqx3njV8rx5rw3P+MS7dl X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2017 21:11:10.6727 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1151 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 4c1b5fd..66ddf5e 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -106,12 +106,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; @@ -340,13 +334,17 @@ void iounmap(volatile void __iomem *addr) return; /* - * __ioremap special-cases the PCI/ISA range by not instantiating a - * vm_area and by simply returning an address into the kernel mapping - * of ISA space. So handle that here. + * The PCI/ISA range special-casing was removed from __ioremap() + * so this check, in theory, can be removed. However, there are + * cases where iounmap() is called for addresses not obtained via + * ioremap() (vga16fb for example). Add a warning so that these + * cases can be caught and fixed. */ if ((void __force *)addr >= phys_to_virt(ISA_START_ADDRESS) && - (void __force *)addr < phys_to_virt(ISA_END_ADDRESS)) + (void __force *)addr < phys_to_virt(ISA_END_ADDRESS)) { + WARN(1, "iounmap() called for ISA range not obtained using ioremap()\n"); return; + } addr = (volatile void __iomem *) (PAGE_MASK & (unsigned long __force)addr);