|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Xen on Zen 3
On 07.04.2026 10:08, Matyáš Kroupa wrote: > Hi, > I am trying to run Xen on a bare metal with Zen 3 microarchitecture (to be > specific Ryzen 9 5950X). I am using Fedora 43 as Dom0 in PVH mode. However, > the > Linux kernel crashes early in the boot causing Xen to reboot. I am not > exactly > sure if Linux or Xen is the problematic part. The kernel boots fine without > Xen. Before Ryzen 9 I had Ryzen 5 3400G (Zen+) which booted even with Xen. > > The Xen is a backported from Fedora 44 (not yet released) because I need Xen > 4.21 features, mainly ReBAR support for the Arc B50 GPU. Package > specification > with build commands can be found on https://src.fedoraproject.org/rpms/xen/ > blob/f44/f/xen.spec. There are also downstream patches and configuration. > > I have set up a serial link, so I have some logs. They are in the attachment. > I have used gdb to translate the binary offset to source code line. The > problematic line is https://elixir.bootlin.com/linux/v6.19.10/source/arch/x86/ > kernel/amd_node.c#L296. It seems that linux is detecting zero PCI roots on > non-zero number of nodes causing division by zero. Not exactly, there is an earlier exit from the function when num_roots is 0. If that line is the problem one, then presumably num_roots < num_nodes, thus yielding roots_per_node as 0. Sadly you didn't enable enough verbosity for pr_debug("Found %d AMD root devices\n", num_roots); to actually leave a trace in the log. I'd guess the value to be 1, but there being multiple nodes at the same time. You may want to instrument the function a little more to be certain. Seeing static inline u16 amd_num_nodes(void) { return topology_amd_nodes_per_pkg() * topology_max_packages(); } I'm not overly surprised of problems, though. Our topology representation still has a lot of work to do before the data can be reliably used. For your immediate purpose you may want to change the "!num_roots" check into a "num_roots < num_nodes" one (on the assumption that num_nodes can't be 0). Whether that's acceptable upstream I don't know, of course. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |