system/physmem: poisoned memory discard on reboot
authorWilliam Roche <william.roche@oracle.com>
Tue, 11 Feb 2025 21:27:06 +0000 (21:27 +0000)
committerPeter Xu <peterx@redhat.com>
Wed, 12 Feb 2025 16:33:13 +0000 (11:33 -0500)
commit30943e496f2b0a49357581af480bdcd74fb338f5
tree1479b49b52c046adf583c0c5394977887b7a57a8
parentc1cda1c5f8faf18994dacb8c733ad22e22c2318f
system/physmem: poisoned memory discard on reboot

Repair poisoned memory location(s), calling ram_block_discard_range():
punching a hole in the backend file when necessary and regenerating
a usable memory.
If the kernel doesn't support the madvise calls used by this function
and we are dealing with anonymous memory, fall back to remapping the
location(s).

Signed-off-by: William Roche <william.roche@oracle.com>
Acked-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/20250211212707.302391-3-william.roche@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
system/physmem.c