When I attempt to boot FreeBSD using the xen kernel compiled with FreeBSD 14 ( llvm v16.0.6 ), the FreeBSD kernel fails to boot. I gets stuck during the Launching APs step. I force installed the xen-kernel package from a FreeBSD 13.2 system and that boots fine, so I assume this is an issue with code generated with the newer LLVM mc. Boot video attached.
Created attachment 248646 [details] Booting FreeBSD 14 with xen-kernel built with 14
Sorry. Video was too large. Included a pic.
*** Bug 277199 has been marked as a duplicate of this bug. ***
Just picked up the 14.0 build of xen-kernel and can indeed reproduce this. Looking into it.
Created attachment 248661 [details] Fix clang codegen The following should fix it, will submit to xen-devel for review.
For the record, here is the bug report against llvm: https://github.com/llvm/llvm-project/issues/82598
Thanks for the help with this Roger. It's very much appreciated. I'll see if I can get the port to build with a patch based on your diff and give it a spin. On a related note, when I booted the FreeBSD 14 dom0 using the xen-kernel pkg build with 13.2, I noticed that the interrupts were showing > %50 in top while idle. Did you notice anything like that? It 'seemed' responsive enough though, so may be just an accounting bug of some sort.
Hm, it's possible the build in 13.2 is also affected by this code generation issue, albeit in a different way. I will update the port and add the fix while we wait for it to be review upstream.
I'm also seeing the weird interrupt usage in top, however `vmstat -i` doesn't show any interrupt source has having a high rate. It will need some investigation, could you raise a separate ticket for it and assign it to me? For what is worth, I think it's a cosmetic issue, as performance seems to be OK (at least on my end).
I've now updated both the xen-kernel and xen-tools package to 4.18.0.20240201 and included the code generation fix in xen-kernel. I think we will also need it for the pvshim (which is part of xen-tools), but I will backport that one once it's accepted upstream, as it's not so critical.
Hey Roger. I can confirm that FreeBSD 14 boots after upgrading to the following ... xen-kernel: 4.18.0.20231212 -> 4.18.0.20240201 xen-tools: 4.18.0.20231212 -> 4.18.0.20240201_1 Thanks again for your help with this!