From: "Williams, Dan J" <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org"
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: "linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org"
<linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org>
Subject: [GIT PULL] libnvdimm fixes for 4.8
Date: Thu, 29 Sep 2016 21:15:24 +0000 [thread overview]
Message-ID: <1475183722.21419.29.camel@intel.com> (raw)
Hi Linus, please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes
...to receive the following:
- (4) fixes for "flush hint" support. Flush hints are addresses
advertised by the ACPI 6+ NFIT (NVDIMM Firmware Interface Table) that
when written and fenced guarantee that writes pending in platform write
buffers (outside the cpu) have been flushed to media. They might also
be used by hypervisors as a trigger condition to flush guest-persistent
memory ranges to storage.
Fix a potential data corruption issue, a broken definition of the hint
array, a wrong allocation size for the unit test implementation of the
flush hint table, and missing NULL check in an error path. The unit
test, while it did not prevent these bugs from being merged, at least
triggered occasional crashes in advance of production usages.
- Fix handling of ACPI DSM error status results. The DSM mechanism
allows communication with platform and memory device firmware. We
correctly parse known errors, but were silently ignoring others. Fix
it to consistently fail any command with a non-zero status return that
we otherwise do not interpret / handle.
These changes have a build success notification from the 0day robot and
have appeared in a -next release over the past week.
The following changes since commit 3be7988674ab33565700a37b210f502563d932e6:
Linux 4.8-rc7 (2016-09-18 17:27:41 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes
for you to fetch changes up to 595c73071e6641e59b83911fbb4026e767471000:
libnvdimm, region: fix flush hint table thinko (2016-09-24 11:45:38 -0700)
----------------------------------------------------------------
Dan Williams (4):
tools/testing/nvdimm: fix allocation range for mock flush hint tables
libnvdimm: fix devm_nvdimm_memremap() error path
nfit: fail DSMs that return non-zero status by default
libnvdimm, region: fix flush hint table thinko
Oliver O'Halloran (1):
nvdimm: fix PHYS_PFN/PFN_PHYS mixup
drivers/acpi/nfit/core.c | 48 +++++++++++++++++++++++-----------------
drivers/nvdimm/core.c | 8 ++++++-
drivers/nvdimm/nd.h | 22 ++++++++++++++++--
drivers/nvdimm/region_devs.c | 22 ++++++++++--------
tools/testing/nvdimm/test/nfit.c | 3 ++-
5 files changed, 70 insertions(+), 33 deletions(-)
commit 480b6837aa579991c6acc113bccf838e6a90843c
Author: Oliver O'Halloran <oohall@gmail.com>
Date: Mon Sep 19 20:19:00 2016 +1000
nvdimm: fix PHYS_PFN/PFN_PHYS mixup
nd_activate_region() iomaps any hint addresses required when activating
a region. To prevent duplicate mappings it checks the PFN of the hint to
be mapped against the PFNs of the already mapped hints. Unfortunately it
doesn't convert the PFN back into a physical address before passing it
to devm_nvdimm_ioremap(). Instead it applies PHYS_PFN a second time
which ends about as well as you would imagine.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
commit 9d15ce9caaf9ecbec74e3be156a4a57451ed16c2
Author: Dan Williams <dan.j.williams@intel.com>
Date: Mon Sep 19 13:49:48 2016 -0700
tools/testing/nvdimm: fix allocation range for mock flush hint tables
Commit 480b6837aa57 "nvdimm: fix PHYS_PFN/PFN_PHYS mixup" identified
that we were passing an invalid address to devm_nvdimm_ioremap(). With
that fixed it exposed a bug in the memory reservation size for flush
hint tables. Since we map a full page we need to mock a full page of
memory to back the flush hint table entries.
Cc: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
commit ecfb6d8a041cc2ca80bc69ffc20c00067d190df5
Author: Dan Williams <dan.j.williams@intel.com>
Date: Wed Sep 21 09:22:33 2016 -0700
libnvdimm: fix devm_nvdimm_memremap() error path
The internal alloc_nvdimm_map() helper might fail, particularly if the
memory region is already busy. Report request_mem_region() failures and
check for the failure.
Reported-by: Ryan Chen <ryan.chan105@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
commit 11294d63ac915230a36b0603c62134ef7b173d0a
Author: Dan Williams <dan.j.williams@intel.com>
Date: Wed Sep 21 09:21:26 2016 -0700
nfit: fail DSMs that return non-zero status by default
For the DSMs where the kernel knows the format of the output buffer and
originates those DSMs from within the kernel, return -EIO for any
non-zero status. If the BIOS is indicating a status that we do not know
how to handle, fail the DSM.
Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
commit 595c73071e6641e59b83911fbb4026e767471000
Author: Dan Williams <dan.j.williams@intel.com>
Date: Fri Sep 23 17:53:52 2016 -0700
libnvdimm, region: fix flush hint table thinko
The definition of the flush hint table as:
void __iomem *flush_wpq[0][0];
...passed the unit test, but is broken as flush_wpq[0][1] and
flush_wpq[1][0] refer to the same entry. Fix this to use a helper that
calculates a slot in the table based on the geometry of flush hints in
the region. This is important to get right since virtualization
solutions use this mechanism to trigger hypervisor flushes to platform
persistence.
Reported-by: Dave Jiang <dave.jiang@intel.com>
Tested-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
reply other threads:[~2016-09-29 21:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1475183722.21419.29.camel@intel.com \
--to=dan.j.williams-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).