From: Boaz Harrosh <boaz@plexistor.com>
To: Dan Williams <dan.j.williams@intel.com>, Ingo Molnar <mingo@kernel.org>
Cc: Matthew Wilcox <willy@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
x86@kernel.org, linux-kernel <linux-kernel@vger.kernel.org>,
"Roger C. Pao" <rcpao.enmotus@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-nvdimm <linux-nvdimm@lists.01.org>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [Linux-nvdimm] [PATCH 0/2] e820: Fix handling of NvDIMM chips
Date: Thu, 19 Feb 2015 12:27:28 +0200 [thread overview]
Message-ID: <54E5BA90.3010609@plexistor.com> (raw)
In-Reply-To: <CAPcyv4inN4Pja9vOpYd8m_RB6kgFmjQXvwJv3CqKwEUaaXpNCw@mail.gmail.com>
On 02/18/2015 09:35 PM, Dan Williams wrote:
> On Wed, Feb 18, 2015 at 11:27 AM, Ingo Molnar <mingo@kernel.org> wrote:
>>
<>
>>>>>>>
>>>>>>> No, it seems the safe thing to do is prevent the
>>>>>>> kernel from accessing any memory that it does not know
>>>>>>> the side-effects of accessing.
>>>>>>
<>
The Kernel does not do any such access.
Reading the code the "busy" state of the unknown type looks
like an accident to me. The code just assumes all types are
known. And did a negative check.
Consider a memory-region that sits on a PCIE slot. The BUS
does not know anything about that BAR, it just exposes that
information up the stack so a driver can positively identify
its device and drive it.
Same here. e820 is just a description of what sits on the
DDR I^2C bus as read by the BIOS (or other means). The actual
driver of these is for example the add_memory() call. Well sure
unknown-types are not added to any active use.
Parallel to what you are saying is that we band any PCI-ID
that does not have a registered device-id, the card will be
enumerated but drivers will receive "already taken" even
though no one is using it.
If you really believe in what you are saying then please
move away from the "busy" bit. "busy" bit means "taken".
Have a new bit saying. "no one told me about this device"
>>>>>> Well, except when the kernel does know how to access
>>>>>> it: when an nvdimm driver knows about its own memory
>>>>>> region and knows how to handle it, right?
>>>>>
<>
>>>>
>>>> But ... if a user is blessed/haunted with such firmware,
>>>> why not let new types fall back to 'reserved', which is a
>>>> reasonable default that still allows sufficiently aware
>>>> Linux drivers to work, right?
>>>
I want to emphasize here. After my patch the new type is
distinctly differentiated from the regular "reserved"
type so any knowledgeable driver can easily distinguish
it from a regular "reserved" region.
Only that when such driver wants to register its use
of that region it does not receive a phony busy.
[And Proceed to use that region by ignoring the phony busy]
<>
>>
>> Well, we could emit a warning (or taint the kernel), to
>> keep the user informed that there's a version mismatch
>> between kernel and firmware - but otherwise still allow
>> informed drivers to register that region?
>
> Sounds good to me.
>
There is already a distinct message both at dmesg bring up:
user: [mem 0x0000000100000000-0x000000017fffffff] type 12
And at /proc/iomem
100000000-1ffffffff : reserved-unknown
I would love to make this:
100000000-1ffffffff : unknown-12
But it will need a bit of code to maintain such strings
So the information for any one that wants to look for it is there.
Do you require another redundant message who's purpose is to scare
people off, like:
e820: WARN [mem 0x0000000100000000-0x000000017fffffff] is unknown type 12
Sure I'll add it
Thanks
Boaz
WARNING: multiple messages have this Message-ID (diff)
From: Boaz Harrosh <boaz@plexistor.com>
To: Dan Williams <dan.j.williams@intel.com>, Ingo Molnar <mingo@kernel.org>
Cc: Matthew Wilcox <willy@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
x86@kernel.org, linux-kernel <linux-kernel@vger.kernel.org>,
"Roger C. Pao" <rcpao.enmotus@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-nvdimm <linux-nvdimm@ml01.01.org>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [Linux-nvdimm] [PATCH 0/2] e820: Fix handling of NvDIMM chips
Date: Thu, 19 Feb 2015 12:27:28 +0200 [thread overview]
Message-ID: <54E5BA90.3010609@plexistor.com> (raw)
In-Reply-To: <CAPcyv4inN4Pja9vOpYd8m_RB6kgFmjQXvwJv3CqKwEUaaXpNCw@mail.gmail.com>
On 02/18/2015 09:35 PM, Dan Williams wrote:
> On Wed, Feb 18, 2015 at 11:27 AM, Ingo Molnar <mingo@kernel.org> wrote:
>>
<>
>>>>>>>
>>>>>>> No, it seems the safe thing to do is prevent the
>>>>>>> kernel from accessing any memory that it does not know
>>>>>>> the side-effects of accessing.
>>>>>>
<>
The Kernel does not do any such access.
Reading the code the "busy" state of the unknown type looks
like an accident to me. The code just assumes all types are
known. And did a negative check.
Consider a memory-region that sits on a PCIE slot. The BUS
does not know anything about that BAR, it just exposes that
information up the stack so a driver can positively identify
its device and drive it.
Same here. e820 is just a description of what sits on the
DDR I^2C bus as read by the BIOS (or other means). The actual
driver of these is for example the add_memory() call. Well sure
unknown-types are not added to any active use.
Parallel to what you are saying is that we band any PCI-ID
that does not have a registered device-id, the card will be
enumerated but drivers will receive "already taken" even
though no one is using it.
If you really believe in what you are saying then please
move away from the "busy" bit. "busy" bit means "taken".
Have a new bit saying. "no one told me about this device"
>>>>>> Well, except when the kernel does know how to access
>>>>>> it: when an nvdimm driver knows about its own memory
>>>>>> region and knows how to handle it, right?
>>>>>
<>
>>>>
>>>> But ... if a user is blessed/haunted with such firmware,
>>>> why not let new types fall back to 'reserved', which is a
>>>> reasonable default that still allows sufficiently aware
>>>> Linux drivers to work, right?
>>>
I want to emphasize here. After my patch the new type is
distinctly differentiated from the regular "reserved"
type so any knowledgeable driver can easily distinguish
it from a regular "reserved" region.
Only that when such driver wants to register its use
of that region it does not receive a phony busy.
[And Proceed to use that region by ignoring the phony busy]
<>
>>
>> Well, we could emit a warning (or taint the kernel), to
>> keep the user informed that there's a version mismatch
>> between kernel and firmware - but otherwise still allow
>> informed drivers to register that region?
>
> Sounds good to me.
>
There is already a distinct message both at dmesg bring up:
user: [mem 0x0000000100000000-0x000000017fffffff] type 12
And at /proc/iomem
100000000-1ffffffff : reserved-unknown
I would love to make this:
100000000-1ffffffff : unknown-12
But it will need a bit of code to maintain such strings
So the information for any one that wants to look for it is there.
Do you require another redundant message who's purpose is to scare
people off, like:
e820: WARN [mem 0x0000000100000000-0x000000017fffffff] is unknown type 12
Sure I'll add it
Thanks
Boaz
next prev parent reply other threads:[~2015-02-19 10:27 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-16 11:07 [PATCH 0/2] e820: Fix handling of NvDIMM chips Boaz Harrosh
2015-02-16 11:07 ` Boaz Harrosh
2015-02-16 11:13 ` [PATCH 1/2] e820: Don't let unknown DIMM type come out BUSY Boaz Harrosh
2015-02-16 11:13 ` Boaz Harrosh
2015-02-16 11:16 ` [RFC 2/2] e820: Add the NvDIMM Memory type (type-12) Boaz Harrosh
2015-02-16 11:16 ` Boaz Harrosh
2015-02-16 11:24 ` [PATCH 3/3] pmem: Allow request_mem to fail, (CONFIG_BLK_DEV_PMEM_IGNORE_REQUEST_MEM_RET) Boaz Harrosh
2015-02-16 11:24 ` Boaz Harrosh
2015-02-17 20:52 ` Ross Zwisler
2015-02-17 20:52 ` Ross Zwisler
2015-02-18 9:58 ` Boaz Harrosh
2015-02-18 9:58 ` Boaz Harrosh
2015-02-16 22:03 ` [Linux-nvdimm] [PATCH 0/2] e820: Fix handling of NvDIMM chips Matthew Wilcox
2015-02-16 22:03 ` Matthew Wilcox
2015-02-17 8:42 ` Boaz Harrosh
2015-02-17 8:42 ` Boaz Harrosh
2015-02-18 18:15 ` Dan Williams
2015-02-18 18:15 ` Dan Williams
2015-02-18 18:30 ` Ingo Molnar
2015-02-18 18:30 ` Ingo Molnar
2015-02-18 18:44 ` Dan Williams
2015-02-18 18:44 ` Dan Williams
2015-02-18 18:53 ` Ingo Molnar
2015-02-18 18:53 ` Ingo Molnar
2015-02-18 19:18 ` Dan Williams
2015-02-18 19:18 ` Dan Williams
2015-02-18 19:27 ` Ingo Molnar
2015-02-18 19:27 ` Ingo Molnar
2015-02-18 19:35 ` Dan Williams
2015-02-18 19:35 ` Dan Williams
2015-02-19 10:27 ` Boaz Harrosh [this message]
2015-02-19 10:27 ` Boaz Harrosh
2015-02-19 10:30 ` Ingo Molnar
2015-02-19 10:30 ` Ingo Molnar
2015-02-19 0:47 ` Christoph Hellwig
2015-02-19 1:03 ` Dan Williams
2015-02-19 10:01 ` Ingo Molnar
2015-02-19 10:29 ` Boaz Harrosh
2015-02-19 10:31 ` Ingo Molnar
2015-02-19 10:40 ` Boaz Harrosh
2015-02-19 9:25 ` Boaz Harrosh
2015-02-22 16:27 ` Christoph Hellwig
2015-02-22 17:05 ` Boaz Harrosh
2015-02-22 17:15 ` Boaz Harrosh
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=54E5BA90.3010609@plexistor.com \
--to=boaz@plexistor.com \
--cc=dan.j.williams@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=rcpao.enmotus@gmail.com \
--cc=ross.zwisler@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=willy@linux.intel.com \
--cc=x86@kernel.org \
/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.