mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Andryuk <jason.andryuk@amd.com>
To: Borislav Petkov <bp@alien8.de>,
	Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>,
	Yazen Ghannam <yazen.ghannam@amd.com>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>, <x86@kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Penny Zheng <penny.zheng@amd.com>, <stable@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: Avoid divide by 0 in amd_smn_init()
Date: Wed, 24 Jun 2026 12:41:48 -0400	[thread overview]
Message-ID: <0500111d-91bf-4105-8de3-af44a113157a@amd.com> (raw)
In-Reply-To: <20260624155910.GCajv-zguf0GiBxt2F@fat_crate.local>

On 2026-06-24 11:59, Borislav Petkov wrote:
> + Andy
> 
> On Wed, Jun 24, 2026 at 11:41:16AM -0400, Jason Andryuk wrote:
>> I have wip s0ix support with Xen where dom0 issues the amd-pmc calls to
>> enter s0ix.  I'm not sure of all the uses of SMN, but with Xen dom0/hardware
>> domain running most drivers, I think it should be available.
> 
> Well, how should we make it available if dom0 doesn't really allow us to
> enumerate PCI roots and thus count AMD nodes?

dom0 enumerates the physical PCI roots.  It's just the dom0 vCPUs and 
topology are synthetic.

> Andy, see upthread.
> 
> What would you suggest we do here on dom0? We're trying to enumerate AMD
> nodes but dom0 is doing something special wrt topology and PCI roots - see
> get_next_root() in amd_node.c.
> 
> Thx.
> 

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.

We don't want dom0 to access the "CPU/node" devices.  It's the "root" 
device SMN access I am trying to retain.  Many amd_smn_read/write calls 
have hardcoded node 0, like for amd-pmc.

Regards,
Jason

  reply	other threads:[~2026-06-24 16:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 21:19 Jason Andryuk
2026-06-23 21:35 ` Borislav Petkov
2026-06-24 15:41   ` Jason Andryuk
2026-06-24 15:59     ` Borislav Petkov
2026-06-24 16:41       ` Jason Andryuk [this message]
2026-06-24 17:15         ` Borislav Petkov
2026-06-24 19:08           ` Jason Andryuk
2026-06-24 19:25             ` Borislav Petkov
2026-06-24  9:21 ` Ingo Molnar
2026-06-24 14:54   ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0500111d-91bf-4105-8de3-af44a113157a@amd.com \
    --to=jason.andryuk@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mingo@redhat.com \
    --cc=penny.zheng@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    --cc=yazen.ghannam@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®