On Sun, Nov 15, 2020 at 06:49:38PM +0100, Manuel Bouyer wrote: > Hello, > I spent some more time debugging NetBSD as a PVH dom0 on Xen, > With Roger's patch to avoid a Xen panic, the NetBSD kernel stalls > configuring devices. At first I though it was an issue with hardware > interrupts, but it more likely is an issue with Xen timer events. > Specifically: virtual CPU 0 stops receiving timer events, while other > CPUs keep receiving them. I tried to force a timer rearm but this didn't help. > The event is not masked nor pending on Xen or NetBSD, as confirmed by 'q'. > Others events (the Xen console, the debug event) are properly received > by CPU0. I don't know how to debug this more at this point.
You could try to use dom0_vcpus_pin command line option and then dump the timers using the 'a' debug key, this way you can see if CPU0 has a timer pending (which would be the vCPU0 timer). What timer is NetBSD using, is it the PV vCPU single shot timer, the periodic one, or the emulated local APIC timer? Depending on the timer you are trying to use I would recommend to add some printks if needed. Roger.
