commit 35b1c016e3293480f87c49d5a53f7c59dcd16449 Author: Nick Hudson Date: Tue May 12 16:17:30 2026 +0100 Enhance pmap_test_mod_ref to catch the mi pmap broken case diff --git a/sys/uvm/pmap/pmap.c b/sys/uvm/pmap/pmap.c index 54049af73988..4bd230cf00ac 100644 --- a/sys/uvm/pmap/pmap.c +++ b/sys/uvm/pmap/pmap.c @@ -2614,7 +2614,7 @@ pmap_test_mod_ref(void) ref = pmap_is_referenced(pg); exp_mod = false; exp_ref = true; - printf("%s: ref val=%d: mod=%d(%d) ref=%d(%d) (%s)\n", + printf("%s: ref 1: val=%d: mod=%d(%d) ref=%d(%d) (%s)\n", __func__, val, mod, exp_mod, ref, exp_ref, @@ -2639,6 +2639,19 @@ pmap_test_mod_ref(void) mod, exp_mod, ref, exp_ref, mod == exp_mod && ref == exp_ref ? "OK" : "FAIL"); + /* reference page again */ + val = *loc; + + mod = pmap_is_modified(pg); + ref = pmap_is_referenced(pg); + exp_mod = false; + exp_ref = true; + printf("%s: ref 2: val=%d: mod=%d(%d) ref=%d(%d) (%s)\n", + __func__, + val, + mod, exp_mod, ref, exp_ref, + mod == exp_mod && ref == exp_ref ? "OK" : "FAIL"); + /* modify page */ *loc = 0xff;