From: Ackerley Tng Add a TODO comment noting that PFN mode does not use page-cache folios, so ->error_remove_folio() will not be called by the core memory failure infrastructure when physical memory errors occur. Signed-off-by: Ackerley Tng --- virt/kvm/guest_memfd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c index 5741ff6ab94c6..c89df77df7146 100644 --- a/virt/kvm/guest_memfd.c +++ b/virt/kvm/guest_memfd.c @@ -1068,6 +1068,11 @@ static int kvm_gmem_migrate_folio(struct address_space *mapping, return -EINVAL; } +/* + * TODO: Support memory failure notification for PFN mode. In PFN mode, memory + * is not backed by page cache folios, so ->error_remove_folio() will not be + * invoked by the core memory failure handler. + */ static int kvm_gmem_error_folio(struct address_space *mapping, struct folio *folio) { struct inode *inode = mapping->host; -- 2.56.0.257.gf7497c7d27-goog