This type of spurious fault was consistently observed on each boot during my initial attempts to boot -CURRENT on a Banana Pi BPI-F3 board.
Every boot would inevitably hit the same panic in `vtbuf_grow()`:
```
panic: acquiring blockable sleep lock with spinlock or critical section held (sleep mutex) pmap @ /usr/src/sys/riscv/riscv/pmap.c:2944
cpuid = 0
time = 1
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x36
kdb_backtrace() at kdb_backtrace+0x2c
vpanic() at vpanic+0x16e
panic() at panic+0x26
witness_checkorder() at witness_checkorder+0xb70
__mtx_lock_flags() at __mtx_lock_flags+0x86
pmap_fault() at pmap_fault+0x4e
page_fault_handler() at page_fault_handler+0x11e
do_trap_supervisor() at do_trap_supervisor+0x6c
cpu_exception_handler_supervisor() at cpu_exception_handler_supervisor+0x74
--- exception 15, tval = 0xffffffc05d4263b8
memmove() at memmove+0xd6
vtbuf_grow() at vtbuf_grow+0x256
vt_change_font() at vt_change_font+0xfc
vt_resize() at vt_resize+0x88
vt_upgrade() at vt_upgrade+0x56a
mi_startup() at mi_startup+0x1e6
va() at va+0x60
KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at kdb_enter+0x3a: sd zero,316(s1)
db>
```
`vtbuf_grow` holds a spinlock while growing the buffer and consistently triggers a spurious page fault while copying the old rows, resulting in the panic listed above.
I also encountered spurious page faults in the idle thread, which resulted in a similar panic - `mtx_lock() by idle thread ...`
Applying this patch fixes the boot sequence:
```
VT(efifb): resolution 1920x1080
SBI: OpenSBI v1.3
SBI Specification Version: 1.0
CPU 0 : Vendor=SpacemiT Core=SpacemiT(R) X60 (Hart 0)
marchid=0x8000000058000001, mimpid=0x1000000049772200
MMU: 0x1<Sv39>
ISA: 0x112f<Atomic,Compressed,Double,Float,Mult/Div>
S-mode Extensions: 0x1f<Sstc,Svnapot,Svpbmt,Svinval,Sscofpmf>
[[snip]]
sbi0: <RISC-V Supervisor Binary Interface>
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
intc0: <RISC-V Local Interrupt Controller> on ofwbus0
sbi_ipi0: <RISC-V SBI Inter-Processor Interrupts> on sbi0
plic0: <RISC-V PLIC> mem 0xe0000000-0xe3ffffff irq 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24 on simplebus0
timer0: <RISC-V Timer>
Timecounter "RISC-V Timecounter" frequency 24000000 Hz quality 1000
Event timer "RISC-V Eventtimer" frequency 24000000 Hz quality 1000
rcons0: <RISC-V console>
Timecounters tick every 1.000 msec
usb_needs_explore_all: no devclass
sbi_ipi0: using for IPIs
Release APs
[[snip]]
mountroot>
```