Honor the vm page's PG_NODUMP flag on arm and i386.

Reviewed by:	kib, markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27949
This commit is contained in:
Alan Cox 2021-01-04 15:59:05 -06:00
parent 9c0ff6a8bb
commit 7beeacb27b
2 changed files with 6 additions and 0 deletions

View File

@ -68,8 +68,11 @@ static uint64_t counter, progress;
static int
is_dumpable(vm_paddr_t pa)
{
vm_page_t m;
int i;
if ((m = vm_phys_paddr_to_vm_page(pa)) != NULL)
return ((m->flags & PG_NODUMP) == 0);
for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) {
if (pa >= dump_avail[i] && pa < dump_avail[i + 1])
return (1);

View File

@ -65,8 +65,11 @@ static uint64_t counter, progress;
static int
is_dumpable(vm_paddr_t pa)
{
vm_page_t m;
int i;
if ((m = vm_phys_paddr_to_vm_page(pa)) != NULL)
return ((m->flags & PG_NODUMP) == 0);
for (i = 0; dump_avail[i] != 0 || dump_avail[i + 1] != 0; i += 2) {
if (pa >= dump_avail[i] && pa < dump_avail[i + 1])
return (1);