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

Re: Xen on Zen 3


  • To: Matyáš Kroupa <kroupa.matyas@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 7 Apr 2026 11:05:40 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=suse.com header.i="@suse.com" header.h="Content-Transfer-Encoding:In-Reply-To:Autocrypt:From:Cc:Content-Language:References:To:Subject:User-Agent:MIME-Version:Date:Message-ID"
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: xen-devel@xxxxxxxxxxxxx
  • Delivery-date: Tue, 07 Apr 2026 09:05:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.