[...]
I finally managed to get a serial console up (and will fix the how-to, hi
gdt@!). The problem was reasonably obvious:
[ 1.0000030] mfii0 at pci4 dev 0 function 0: "ServeRAID M5110", firmware 23.34.0-0023, 512MB cache
[ 1.0000030] panic: pirq 4991 out of bound, increase NR_PIRQS
[ 1.0000030] cpu0: Begin traceback...
[ 1.0000030] vpanic() at netbsd:vpanic+0x177
[ 1.0000030] panic() at netbsd:panic+0x3c
[ 1.0000030] bind_pirq_to_evtch() at netbsd:bind_pirq_to_evtch+0x97
From sys/arch/xen/xen/evtchn.c:
#define NR_PIRQS NR_EVENT_CHANNELS
This equates to 4096 and, indeed, 4991 is greater than 4096.
I applied the following brute-force patch and it boots fine:
--- sys/arch/xen/xen/evtchn.c 7 Sep 2022 00:40:19 -0000 1.100
+++ sys/arch/xen/xen/evtchn.c 24 Mar 2025 14:18:26 -0000
@@ -89,7 +89,7 @@
#define NBSD_XEN_MAX_VCPUS HVM_MAX_VCPUS
#endif
-#define NR_PIRQS NR_EVENT_CHANNELS
+#define NR_PIRQS (NR_EVENT_CHANNELS*2)