[PATCH 0/3] libvdimm: Support namespace enumeration while locked

From: Dan Williams
Date: Thu Jun 14 2018 - 20:47:58 EST


The NVDIMM_FAMILY_INTEL DSM path for manipulating labels explicitly
allows reading the namespace label area while the DIMM is locked. In
contrast the ACPI _LSR method for reading labels only indicates if the
label area is locked and returns no data.

It naturally follows that if the namespace label area is locked, the
DIMM is locked since the driver is prevented from discovering namespace
boundaries.

On platforms where both mechanisms are available, prefer the
NVDIMM_FAMILY_INTEL implementation and support enumerating namespace
boundaries while the DIMM is locked.

In addition to ACPI capability detection and the libnvdimm core change
to fail probe of locked namespaces, provide a capability to inject this
semantic difference via nfit_test.

---

Dan Williams (3):
libnvdimm: Introduce locked DIMM capacity support
acpi, nfit: Prefer _DSM over _LSR for namespace label reads
tools/testing/nvdimm: Make DSM failure code injection an override


drivers/acpi/nfit/core.c | 12 +++++++++
drivers/nvdimm/dimm.c | 24 +++++++++++++++++--
drivers/nvdimm/namespace_devs.c | 23 ++++++++++++++++++
drivers/nvdimm/nd.h | 1 +
tools/testing/nvdimm/test/nfit.c | 49 +++++++++++++++++++++++++-------------
5 files changed, 89 insertions(+), 20 deletions(-)