<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/amd_nb.c, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-03-19T10:18:05Z</updated>
<entry>
<title>x86/amd_node, platform/x86/amd/hsmp: Have HSMP use SMN through AMD_NODE</title>
<updated>2025-03-19T10:18:05Z</updated>
<author>
<name>Yazen Ghannam</name>
</author>
<published>2025-01-30T19:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a3dc0f7c4ccf13098dba804be06799b4bd46c7a'/>
<id>urn:sha1:8a3dc0f7c4ccf13098dba804be06799b4bd46c7a</id>
<content type='text'>
The HSMP interface is just an SMN interface with different offsets.

Define an HSMP wrapper in the SMN code and have the HSMP platform driver
use that rather than a local solution.

Also, remove the "root" member from AMD_NB, since there are no more
users of it.

Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Reviewed-by: Carlos Bilbao &lt;carlos.bilbao@kernel.org&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20250130-wip-x86-amd-nb-cleanup-v4-1-b5cc997e471b@amd.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Use rdmsr_safe() in amd_get_mmconfig_range()</title>
<updated>2025-03-07T12:28:31Z</updated>
<author>
<name>Andrew Cooper</name>
</author>
<published>2025-03-07T00:28:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=14cb5d83068ecf15d2da6f7d0e9ea9edbcbc0457'/>
<id>urn:sha1:14cb5d83068ecf15d2da6f7d0e9ea9edbcbc0457</id>
<content type='text'>
Xen doesn't offer MSR_FAM10H_MMIO_CONF_BASE to all guests.  This results
in the following warning:

  unchecked MSR access error: RDMSR from 0xc0010058 at rIP: 0xffffffff8101d19f (xen_do_read_msr+0x7f/0xa0)
  Call Trace:
   xen_read_msr+0x1e/0x30
   amd_get_mmconfig_range+0x2b/0x80
   quirk_amd_mmconfig_area+0x28/0x100
   pnp_fixup_device+0x39/0x50
   __pnp_add_device+0xf/0x150
   pnp_add_device+0x3d/0x100
   pnpacpi_add_device_handler+0x1f9/0x280
   acpi_ns_get_device_callback+0x104/0x1c0
   acpi_ns_walk_namespace+0x1d0/0x260
   acpi_get_devices+0x8a/0xb0
   pnpacpi_init+0x50/0x80
   do_one_initcall+0x46/0x2e0
   kernel_init_freeable+0x1da/0x2f0
   kernel_init+0x16/0x1b0
   ret_from_fork+0x30/0x50
   ret_from_fork_asm+0x1b/0x30

based on quirks for a "PNP0c01" device.  Treating MMCFG as disabled is the
right course of action, so no change is needed there.

This was most likely exposed by fixing the Xen MSR accessors to not be
silently-safe.

Fixes: 3fac3734c43a ("xen/pv: support selecting safe/unsafe msr accesses")
Signed-off-by: Andrew Cooper &lt;andrew.cooper3@citrix.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20250307002846.3026685-1-andrew.cooper3@citrix.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Move SMN access code to a new amd_node driver</title>
<updated>2025-01-08T09:59:44Z</updated>
<author>
<name>Mario Limonciello</name>
</author>
<published>2024-12-06T16:12:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6caeafaa324e6aba5ed2ca1a416340c2fd061a2'/>
<id>urn:sha1:d6caeafaa324e6aba5ed2ca1a416340c2fd061a2</id>
<content type='text'>
SMN access was bolted into amd_nb mostly as convenience.  This has
limitations though that require incurring tech debt to keep it working.

Move SMN access to the newly introduced AMD Node driver.

Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Acked-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt; # pdx86
Acked-by: Shyam Sundar S K &lt;Shyam-sundar.S-k@amd.com&gt; # PMF, PMC
Link: https://lore.kernel.org/r/20241206161210.163701-11-yazen.ghannam@amd.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Simplify function 3 search</title>
<updated>2025-01-08T09:58:16Z</updated>
<author>
<name>Yazen Ghannam</name>
</author>
<published>2025-01-07T22:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49b96fc0dddc7b3a01c6707fcaad06fc520402ac'/>
<id>urn:sha1:49b96fc0dddc7b3a01c6707fcaad06fc520402ac</id>
<content type='text'>
Use the newly introduced helper function to look up "function 3". Drop
unused PCI IDs and code.

Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20250107222847.3300430-8-yazen.ghannam@amd.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Use topology info to get AMD node count</title>
<updated>2025-01-08T09:49:20Z</updated>
<author>
<name>Yazen Ghannam</name>
</author>
<published>2025-01-07T22:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc7b2e629e0c9251ba96d864a30d34d1497b1b1b'/>
<id>urn:sha1:bc7b2e629e0c9251ba96d864a30d34d1497b1b1b</id>
<content type='text'>
Currently, the total AMD node count is determined by searching and counting
CPU/node devices using PCI IDs.

However, AMD node information is already available through topology
CPUID/MSRs. The recent topology rework has made this info easier to access.

Replace the node counting code with a simple product of topology info.

Every node/northbridge is expected to have a 'misc' device. Clear everything
out if a 'misc' device isn't found on a node.

Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20250107222847.3300430-7-yazen.ghannam@amd.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Simplify root device search</title>
<updated>2025-01-08T09:48:03Z</updated>
<author>
<name>Yazen Ghannam</name>
</author>
<published>2024-12-06T16:11:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40a5f6ffdfc8f8ed0d8c535dfa3733b31c66a88c'/>
<id>urn:sha1:40a5f6ffdfc8f8ed0d8c535dfa3733b31c66a88c</id>
<content type='text'>
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.

There may be multiple PCIe root complexes within an AMD node. Such is
the case with server or High-end Desktop (HEDT) systems, etc. Therefore
it is not enough to assume "root &lt;-&gt; AMD node" is a 1-to-1 association.

Currently, this is handled by skipping "extra" root complexes during the
search. However, the hardware provides the PCI bus number of an AMD
node's root device.

Use the hardware info to get the root device's bus and drop the extra
search code and PCI IDs.

Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20241206161210.163701-7-yazen.ghannam@amd.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Simplify function 4 search</title>
<updated>2025-01-08T09:47:50Z</updated>
<author>
<name>Yazen Ghannam</name>
</author>
<published>2024-12-06T16:11:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=962f1970a32430ce6c75ea23cbc59d68346481fd'/>
<id>urn:sha1:962f1970a32430ce6c75ea23cbc59d68346481fd</id>
<content type='text'>
Use the newly added helper function to look up a CPU/Node function to
find "function 4" devices.

Thus, avoid the need to regularly add new PCI IDs for basic discovery.
The unique PCI IDs are still useful in case of quirks or functional
changes. And they should be used only in such a manner.

Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20241206161210.163701-6-yazen.ghannam@amd.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Clean up early_is_amd_nb()</title>
<updated>2025-01-08T09:47:22Z</updated>
<author>
<name>Yazen Ghannam</name>
</author>
<published>2024-12-06T16:11:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e13f51b51814e2527c51998d2dae594ef9cb633a'/>
<id>urn:sha1:e13f51b51814e2527c51998d2dae594ef9cb633a</id>
<content type='text'>
The check for early_is_amd_nb() is only useful for systems with GART or
the NB_CFG register.

Zen-based systems (both AMD and Hygon) have neither, so return early for
them.

Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20241206161210.163701-4-yazen.ghannam@amd.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Restrict init function to AMD-based systems</title>
<updated>2025-01-08T09:46:57Z</updated>
<author>
<name>Yazen Ghannam</name>
</author>
<published>2024-12-06T16:11:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bee9e840609cc67d0a7d82f22a2130fb7a0a766d'/>
<id>urn:sha1:bee9e840609cc67d0a7d82f22a2130fb7a0a766d</id>
<content type='text'>
The code implicitly operates on AMD-based systems by matching on PCI
IDs. However, the use of these IDs is going away.

Add an explicit CPU vendor check instead of relying on PCI IDs.

Signed-off-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://lore.kernel.org/r/20241206161210.163701-3-yazen.ghannam@amd.com
</content>
</entry>
<entry>
<title>x86/amd_nb: Add new PCI ID for AMD family 1Ah model 20h</title>
<updated>2024-10-07T19:04:28Z</updated>
<author>
<name>Richard Gong</name>
</author>
<published>2024-09-13T16:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f8bc84b6096f1ffa67252f0f88d86e77f6bbe348'/>
<id>urn:sha1:f8bc84b6096f1ffa67252f0f88d86e77f6bbe348</id>
<content type='text'>
Add new PCI ID for Device 18h and Function 4.

Signed-off-by: Richard Gong &lt;richard.gong@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Link: https://lore.kernel.org/r/20240913162903.649519-1-richard.gong@amd.com
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
</content>
</entry>
</feed>
