Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251AbbDQA6F (ORCPT ); Thu, 16 Apr 2015 20:58:05 -0400 Received: from g9t5008.houston.hp.com ([15.240.92.66]:54700 "EHLO g9t5008.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751506AbbDQA54 (ORCPT ); Thu, 16 Apr 2015 20:57:56 -0400 From: "Elliott, Robert (Server Storage)" To: Andy Lutomirski , Ingo Molnar CC: "axboe@fb.com" , Boaz Harrosh , "Dan Williams" , "H. Peter Anvin" , Jens Axboe , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Borislav Petkov , Andrew Morton , Linus Torvalds , Christoph Hellwig , Ross Zwisler , Matthew Wilcox , "keith.busch@intel.com" , "linux-tip-commits@vger.kernel.org" Subject: RE: [tip:x86/pmem] x86/mm: Add support for the non-standard protected e820 type Thread-Topic: [tip:x86/pmem] x86/mm: Add support for the non-standard protected e820 type Thread-Index: AQHQbXiFz0ZvbomcVk+QKjV7LajGVJ06F14AgAAKZoCAFi1fgIAAHjyQ Date: Fri, 17 Apr 2015 00:55:13 +0000 Message-ID: <94D0CD8314A33A4D9D801C0FE68B40295A8B50A8@G9W0745.americas.hpqcorp.net> References: <1427872339-6688-2-git-send-email-hch@lst.de> <20150402191352.GA10627@gmail.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.210.48.26] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t3H0w9ws024608 Content-Length: 3532 Lines: 87 > -----Original Message----- > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- > owner@vger.kernel.org] On Behalf Of Andy Lutomirski > Sent: Thursday, April 16, 2015 5:31 PM > To: Ingo Molnar > Subject: Re: [tip:x86/pmem] x86/mm: Add support for the non-standard > protected e820 type > > On Thu, Apr 2, 2015 at 12:51 PM, Andy Lutomirski > wrote: > > On Thu, Apr 2, 2015 at 12:13 PM, Ingo Molnar wrote: > >> > >> * Andy Lutomirski wrote: > >> > >>> On Thu, Apr 2, 2015 at 5:31 AM, tip-bot for Christoph Hellwig > >>> wrote: > >>> > Commit-ID: ec776ef6bbe1734c29cd6bd05219cd93b2731bd4 > >>> > Gitweb: > http://git.kernel.org/tip/ec776ef6bbe1734c29cd6bd05219cd93b2731bd4 > >>> > Author: Christoph Hellwig > >>> > AuthorDate: Wed, 1 Apr 2015 09:12:18 +0200 > >>> > Committer: Ingo Molnar > >>> > CommitDate: Wed, 1 Apr 2015 17:02:43 +0200 > >>> > > >>> > x86/mm: Add support for the non-standard protected e820 type > >>> > > >>> > Various recent BIOSes support NVDIMMs or ADR using a > >>> > non-standard e820 memory type, and Intel supplied reference > >>> > Linux code using this type to various vendors. > >>> > > >>> > Wire this e820 table type up to export platform devices for the > >>> > pmem driver so that we can use it in Linux. > >>> > >>> This scares me a bit. Do we know that the upcoming ACPI 6.0 > >>> enumeration mechanism *won't* use e820 type 12? [...] > >> > >> So I know nothing about it, but I'd be surprised if e820 was touched > >> at all, as e820 isn't really well suited to enumerate more complex > >> resources, and it appears pmem wants to grow into complex directions? > > > > I hope so, but I have no idea what the ACPI committee's schemes are. > > > > We could require pmem.enable_legacy_e820=Y to load the driver for now > > if we're concerned about it. > > > > ACPI 6.0 is out: > > http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf > > AFAICT from a quick read, ACPI 6.0 systems will show EFI type 14 > (EfiPersistentMemory), ACPI type 7 (AddressRangePersistentMemory) and > e820 type 7. > > Type 12 is still "OEM defined". See table 15-312. Maybe I'm reading > this wrong. > > *However*, ACPI 6.0 unsurprisingly also has a real enumeration > mechanism for NVDIMMs and such, and those should take precedence. > > So this driver could plausibly be safe even on ACPI 6.0 systems. > Someone from one of the relevant vendors should probably confirm that. > I'm still a bit nervous, though. That value was set aside on behalf of this pre-standard usage, to keep future ACPI revisions from standardizing it for anything else. The kernel should be just as safe in continuing to recognize that value as it is now. New legacy BIOS systems should follow ACPI 6.0 going forward and report type 7 in their E820 tables, along with meeting the other ACPI 6.0 requirements. UEFI systems don't provide an E820 table; that's an artificial creation by the bootloader (e.g., grub2) or the kernel with its add_efi_memmmap parameter. These systems will just report the EFI memory type 14. There was no pre-standard EFI type identified that needed to be blocked out. Any software creating a fake E820 table (grub2, etc.) should map EFI type 14 to E820 type 7. --- Robert Elliott, HP Server Storage ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?