All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: "Elliott, Robert (Server Storage)" <Elliott@hp.com>
Cc: Ingo Molnar <mingo@kernel.org>, "axboe@fb.com" <axboe@fb.com>,
	Boaz Harrosh <boaz@plexistor.com>,
	Dan Williams <dan.j.williams@intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Jens Axboe <axboe@kernel.dk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Christoph Hellwig <hch@lst.de>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Matthew Wilcox <willy@linux.intel.com>,
	"keith.busch@intel.com" <keith.busch@intel.com>,
	"linux-tip-commits@vger.kernel.org" 
	<linux-tip-commits@vger.kernel.org>
Subject: Re: [tip:x86/pmem] x86/mm: Add support for the non-standard protected e820 type
Date: Thu, 16 Apr 2015 17:59:48 -0700	[thread overview]
Message-ID: <CALCETrWX3rhXQ1Quw9yaEipumXEGkZ_9RHeCtOA62vm0nrqc2w@mail.gmail.com> (raw)
In-Reply-To: <94D0CD8314A33A4D9D801C0FE68B40295A8B50A8@G9W0745.americas.hpqcorp.net>

On Thu, Apr 16, 2015 at 5:55 PM, Elliott, Robert (Server Storage)
<Elliott@hp.com> wrote:
>
>
>> -----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 <luto@amacapital.net>
>> wrote:
>> > On Thu, Apr 2, 2015 at 12:13 PM, Ingo Molnar <mingo@kernel.org> wrote:
>> >>
>> >> * Andy Lutomirski <luto@amacapital.net> wrote:
>> >>
>> >>> On Thu, Apr 2, 2015 at 5:31 AM, tip-bot for Christoph Hellwig
>> >>> <tipbot@zytor.com> wrote:
>> >>> > Commit-ID:  ec776ef6bbe1734c29cd6bd05219cd93b2731bd4
>> >>> > Gitweb:
>> http://git.kernel.org/tip/ec776ef6bbe1734c29cd6bd05219cd93b2731bd4
>> >>> > Author:     Christoph Hellwig <hch@lst.de>
>> >>> > AuthorDate: Wed, 1 Apr 2015 09:12:18 +0200
>> >>> > Committer:  Ingo Molnar <mingo@kernel.org>
>> >>> > 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.

Great!

Off-topic: do you know what an NVDIMM control block is?  Are we really
supposed to access NVDIMM registers using MMIO?  If so, that must have
been a beast to get right in the memory controller.  Do you know if
any vendor has published docs for this stuff?

(I'm trying to figure out whether we're supposed to use SMBUS cycles
for any purpose so I can either fix my driver or relegate it to
legacy-only status.)

--Andy

  reply	other threads:[~2015-04-17  1:00 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01  7:12 another pmem variant V3 Christoph Hellwig
2015-04-01  7:12 ` [PATCH 1/2] x86: add support for the non-standard protected e820 type Christoph Hellwig
2015-04-01 14:25   ` [PATCH] SQUASHME: Fixes to e820 handling of pmem Boaz Harrosh
2015-04-02  9:30     ` Christoph Hellwig
2015-04-02  9:37       ` Ingo Molnar
2015-04-02  9:40         ` Christoph Hellwig
2015-04-02 11:18         ` Christoph Hellwig
2015-04-02 11:20       ` Boaz Harrosh
2015-04-02 12:31   ` [tip:x86/pmem] x86/mm: Add support for the non-standard protected e820 type tip-bot for Christoph Hellwig
2015-04-02 19:08     ` Andy Lutomirski
2015-04-02 19:13       ` Ingo Molnar
2015-04-02 19:51         ` Andy Lutomirski
2015-04-16 22:31           ` Andy Lutomirski
2015-04-17  0:55             ` Elliott, Robert (Server Storage)
2015-04-17  0:59               ` Andy Lutomirski [this message]
2015-04-02 20:28     ` Yinghai Lu
2015-04-02 20:23   ` [PATCH 1/2] x86: add " Yinghai Lu
2015-04-03 16:14   ` [Linux-nvdimm] " Toshi Kani
2015-04-03 17:12     ` Yinghai Lu
2015-04-03 20:54       ` Toshi Kani
2015-04-04  9:40         ` Ingo Molnar
2015-04-05  7:44           ` Yinghai Lu
2015-04-06  7:27             ` Ingo Molnar
2015-04-06 17:29           ` Toshi Kani
2015-04-06 18:26             ` Yinghai Lu
2015-04-06 18:23               ` Toshi Kani
2015-04-05  9:18       ` Boaz Harrosh
2015-04-05 20:06         ` Yinghai Lu
2015-04-06  7:16           ` Boaz Harrosh
2015-04-06 15:55       ` Christoph Hellwig
2015-04-01  7:12 ` [PATCH 2/2] pmem: add a driver for persistent memory Christoph Hellwig
2015-04-01 15:18   ` Boaz Harrosh
2015-04-02  9:32     ` Christoph Hellwig
2015-04-02 12:31   ` [tip:x86/pmem] drivers/block/pmem: Add " tip-bot for Ross Zwisler
2015-04-02 15:31 ` [PATCH] pmem: Add prints at module load and unload Boaz Harrosh
2015-04-02 15:39   ` [Linux-nvdimm] " Dan Williams
2015-04-02 15:47     ` Boaz Harrosh
2015-04-02 16:01       ` Dan Williams
2015-04-02 16:44         ` Christoph Hellwig
2015-04-05  8:50           ` Boaz Harrosh
2015-04-07 15:19             ` Christoph Hellwig
2015-04-07 15:34               ` Boaz Harrosh
2015-04-07 15:46 ` [PATCH A+B] " Boaz Harrosh
2015-04-07 15:47   ` [PATCH 1A] pmem: Add prints at pmem_probe/remove Boaz Harrosh
2015-04-07 15:47   ` [PATCH 1B] pmem: Add prints at module load and unload Boaz Harrosh
2015-04-13  9:05   ` [PATCH A+B] " Greg KH
2015-04-13 12:05     ` Boaz Harrosh
2015-04-13 12:36       ` Greg KH
2015-04-13 13:20         ` Boaz Harrosh
2015-04-13 13:36           ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALCETrWX3rhXQ1Quw9yaEipumXEGkZ_9RHeCtOA62vm0nrqc2w@mail.gmail.com \
    --to=luto@amacapital.net \
    --cc=Elliott@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=axboe@kernel.dk \
    --cc=boaz@plexistor.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ross.zwisler@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.