Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Panic on dom0 boot



On Tue, 25 Mar 2025, Manuel Bouyer wrote:
On Mon, Mar 24, 2025 at 02:19:19PM +0000, Stephen Borrill wrote:
[...]
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)

Hum, this probably means we'll have to revisit how physical IRQs are
mapped in our kernel

I created port-xen/59212 but for the moment, I have a workaround even it is overkill. Is it too gross for me to commit (with a suitable XXX comment)? It only increases memory usage by a small mount (as it's just the size of an array of ints).

--
Stephen


Home | Main Index | Thread Index | Old Index