Re: [PATCH] x86: Avoid divide by 0 in amd_smn_init()

From: Borislav Petkov

Date: Wed Jun 24 2026 - 15:26:15 EST


On Wed, Jun 24, 2026 at 03:08:08PM -0400, Jason Andryuk wrote:
> I think Ingo's suggestion to re-add the check will at least get systems
> booting again. Then when Xen SMN accesses is sorted out, that can be
> changed as necessary.

You could do something like the totally untested thing (I'm hoping dom0 sets
X86_FEATURE_XENPV):

...
roots_per_node = num_roots / num_nodes;

if (!roots_per_node) {
if (!cpu_feature_enabled(X86_FEATURE_XENPV))
pr_err(FW_BUG "Error detecting roots per node.");
roots_per_node = 1;
}

until we sort it out and as a stable fix perhaps...

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette