https://github.com/torvalds/linux
Revision 67feaba413ec68daf4124e9870878899b4ed9a0e authored by Dan Williams on 23 September 2022, 22:05:56 UTC, committed by Dan Williams on 25 September 2022, 01:05:53 UTC
The "hmem" platform-devices that are created to represent the
platform-advertised "Soft Reserved" memory ranges end up inserting a
resource that causes the iomem_resource tree to look like this:

340000000-43fffffff : hmem.0
  340000000-43fffffff : Soft Reserved
    340000000-43fffffff : dax0.0

This is because insert_resource() reparents ranges when they completely
intersect an existing range.

This matters because code that uses region_intersects() to scan for a
given IORES_DESC will only check that top-level 'hmem.0' resource and
not the 'Soft Reserved' descendant.

So, to support EINJ (via einj_error_inject()) to inject errors into
memory hosted by a dax-device, be sure to describe the memory as
IORES_DESC_SOFT_RESERVED. This is a follow-on to:

commit b13a3e5fd40b ("ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP")

...that fixed EINJ support for "Soft Reserved" ranges in the first
instance.

Fixes: 262b45ae3ab4 ("x86/efi: EFI soft reservation to E820 enumeration")
Reported-by: Ricardo Sandoval Torres <ricardo.sandoval.torres@intel.com>
Tested-by: Ricardo Sandoval Torres <ricardo.sandoval.torres@intel.com>
Cc: <stable@vger.kernel.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Omar Avelar <omar.avelar@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Mark Gross <markgross@kernel.org>
Link: https://lore.kernel.org/r/166397075670.389916.7435722208896316387.stgit@dwillia2-xfh.jf.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 521a547
History
Tip revision: 67feaba413ec68daf4124e9870878899b4ed9a0e authored by Dan Williams on 23 September 2022, 22:05:56 UTC
devdax: Fix soft-reservation memory description
Tip revision: 67feaba
File Mode Size
Makefile -rw-r--r-- 361 bytes
compat.c -rw-r--r-- 2.2 KB
ipc_sysctl.c -rw-r--r-- 7.2 KB
mq_sysctl.c -rw-r--r-- 3.0 KB
mqueue.c -rw-r--r-- 43.7 KB
msg.c -rw-r--r-- 31.6 KB
msgutil.c -rw-r--r-- 3.6 KB
namespace.c -rw-r--r-- 5.3 KB
sem.c -rw-r--r-- 63.2 KB
shm.c -rw-r--r-- 44.8 KB
syscall.c -rw-r--r-- 5.1 KB
util.c -rw-r--r-- 23.6 KB
util.h -rw-r--r-- 8.9 KB

back to top