Re: [PATCH] x86: Avoid divide by 0 in amd_smn_init()
From: Borislav Petkov
Date: Wed Jun 24 2026 - 13:16:40 EST
On Wed, Jun 24, 2026 at 12:41:48PM -0400, Jason Andryuk wrote:
> I think this is the issue:
>
> The "root" device search was introduced to support SMN access for Zen
> systems. This device represents a PCIe root complex. It is not the
> same as the "CPU/node" devices found at slots 0x18-0x1F.
What is that? AI output?
> We don't want dom0 to access the "CPU/node" devices. It's the "root" device
> SMN access I am trying to retain.
I know what you're trying to do - you want to use SMN accesses on dom0. And
I'm trying to figure out a stable detection method on Xen which is future
proof.
> Many amd_smn_read/write calls have hardcoded node 0, like for amd-pmc.
Maybe.
Whatever it is, it needs to be a long-term solution and properly vetted by Xen
folks so that we don't do crazy hacks for Xen's sake everytime.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette