From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by kanga.kvack.org (Postfix) with ESMTP id 18B506B04AC for ; Tue, 11 Jul 2017 04:35:19 -0400 (EDT) Received: by mail-oi0-f72.google.com with SMTP id z82so9816789oiz.6 for ; Tue, 11 Jul 2017 01:35:19 -0700 (PDT) Received: from mail-oi0-x244.google.com (mail-oi0-x244.google.com. [2607:f8b0:4003:c06::244]) by mx.google.com with ESMTPS id u69si3311685oie.145.2017.07.11.01.35.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jul 2017 01:35:18 -0700 (PDT) Received: by mail-oi0-x244.google.com with SMTP id l130so14777566oib.2 for ; Tue, 11 Jul 2017 01:35:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20170707133804.29711.1616.stgit@tlendack-t1.amdoffice.net> <20170707133925.29711.39301.stgit@tlendack-t1.amdoffice.net> From: Arnd Bergmann Date: Tue, 11 Jul 2017 10:35:17 +0200 Message-ID: Subject: Re: [PATCH v9 07/38] x86/mm: Remove phys_to_virt() usage in ioremap() Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Brian Gerst Cc: Tom Lendacky , 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 , xen-devel@lists.xen.org, Linux-MM , "open list:IOMMU DRIVERS" , 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 , Konrad Rzeszutek Wilk , Borislav Petkov , Andy Lutomirski , Boris Ostrovsky , Dmitry Vyukov , Juergen Gross , Thomas Gleixner , Paolo Bonzini On Tue, Jul 11, 2017 at 6:58 AM, 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 >> >> 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 > > 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(). Could that cause regressions if a driver relies on (write-through) cacheable access to the VGA frame buffer RAM or an read-only cached access to an option ROM but now gets uncached access? I also tried to find out whether we can stop mapping the ISA MMIO area into the linear mapping, but at least the VGA code uses VGA_MAP_MEM() to get access to the same pointers. I'm pretty sure this got copied incorrectly into most other architectures, but it is definitely still used on x86 with vga16fb/vgacon/mdacon. On the plus side, I see that removing this code path will end up restoring MMIOTRACE support for the ISA MMIO range that was apparently removed by accident in commit d61fc44853f4 ("x86: mmiotrace, preview 2") in linux-2.6.27. Arnd -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org