linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Register device memory for poison handling
@ 2026-01-08 15:35 ankita
  2026-01-08 15:35 ` [PATCH v1 1/2] mm: add stubs for PFNMAP memory failure registration functions ankita
  2026-01-08 15:35 ` [PATCH v1 2/2] vfio/nvgrace-gpu: register device memory for poison handling ankita
  0 siblings, 2 replies; 5+ messages in thread
From: ankita @ 2026-01-08 15:35 UTC (permalink / raw)
  To: ankita, vsethi, jgg, mochs, jgg, skolothumtho, alex, linmiaohe,
	nao.horiguchi
  Cc: cjia, zhiw, kjaju, yishaih, kevin.tian, kvm, linux-kernel, linux-mm

From: Ankit Agrawal <ankita@nvidia.com>

Linux MM provides interfaces to allow a driver to [un]register device
memory not backed by struct page for poison handling through
memory_failure.

The device memory on NVIDIA Grace based systems are not added to the
kernel and are not backed by struct pages. So nvgrace-gpu module
which manages the device memory can make use of these interfaces to
get the benefit of poison handling. Make nvgrace-gpu register the device
memory with the MM on open.

Moreover, the stubs are added to accommodate for CONFIG_MEMORY_FAILURE
being disabled.

Patch 1/2 introduces stubs for CONFIG_MEMORY_FAILURE disabled.
Patch 2/2 registers the device memory at the time of open instead of mmap.

Note that this is a reposting of an earlier series [1] which is partly
(patch 1/3) merged to v6.19-rc4. This one addresses the leftover patching.
Many thanks to Jason Gunthorpe (jgg@nvidia.com) and Alex Williamson
(alex@shazbot.org) for valuable suggestions.

Link: https://lore.kernel.org/all/20251213044708.3610-1-ankita@nvidia.com/ [1]

Ankit Agrawal (2):
  mm: add stubs for PFNMAP memory failure registration functions
  vfio/nvgrace-gpu: register device memory for poison handling

 drivers/vfio/pci/nvgrace-gpu/main.c | 116 +++++++++++++++++++++++++++-
 include/linux/memory-failure.h      |  13 +++-
 2 files changed, 123 insertions(+), 6 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-08 19:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-08 15:35 [PATCH v1 0/2] Register device memory for poison handling ankita
2026-01-08 15:35 ` [PATCH v1 1/2] mm: add stubs for PFNMAP memory failure registration functions ankita
2026-01-08 15:35 ` [PATCH v1 2/2] vfio/nvgrace-gpu: register device memory for poison handling ankita
2026-01-08 17:00   ` Jiaqi Yan
2026-01-08 19:21     ` Ankit Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox