From: <will.aitken@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <victor.skvortsov@amd.com>, <lijo.lazar@amd.com>,
Will Aitken <wiaitken@amd.com>
Subject: [PATCH 3/3] drm/amdgpu: Enable xgmi extended peer links for sriov guest
Date: Wed, 8 Oct 2025 13:32:25 +0000 [thread overview]
Message-ID: <20251008133225.1238028-3-will.aitken@amd.com> (raw)
In-Reply-To: <20251008133225.1238028-1-will.aitken@amd.com>
From: Will Aitken <wiaitken@amd.com>
The amd-smi tool relies on extended peer link information to report xgmi
link metrics. The necessary xgmi ta command, GET_EXTEND_PEER_LINKS, has
been enabled in the host driver and this change is necessary for the
guest to make use of it. To handle the case where the host driver does
not have the latest xgmi ta, the guest driver checks for guest support
through a pf2vf feature flag before invoking psp.
Signed-off-by: Will Aitken <wiaitken@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 82500ade240d..b69e376372d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -1649,8 +1649,8 @@ int psp_xgmi_get_topology_info(struct psp_context *psp,
amdgpu_ip_version(psp->adev, MP0_HWIP, 0) ==
IP_VERSION(13, 0, 14) ||
amdgpu_sriov_vf(psp->adev);
- bool ta_port_num_support = amdgpu_sriov_vf(psp->adev) ? 0 :
- psp->xgmi_context.xgmi_ta_caps & EXTEND_PEER_LINK_INFO_CMD_FLAG;
+ bool ta_port_num_support = psp->xgmi_context.xgmi_ta_caps & EXTEND_PEER_LINK_INFO_CMD_FLAG ||
+ amdgpu_sriov_xgmi_ta_ext_peer_link_en(psp->adev);
/* popluate the shared output buffer rather than the cmd input buffer
* with node_ids as the input for GET_PEER_LINKS command execution.
--
2.43.0
next prev parent reply other threads:[~2025-10-08 13:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 13:32 [PATCH 1/3] drm/amdgpu: Refactor sriov xgmi topology filling to common code will.aitken
2025-10-08 13:32 ` [PATCH 2/3] drm/amdgpu: Update headers for sriov xgmi ext peer link support feature flag will.aitken
2025-10-08 13:32 ` will.aitken [this message]
2025-10-28 13:16 ` [PATCH 1/3] drm/amdgpu: Refactor sriov xgmi topology filling to common code Lazar, Lijo
[not found] ` <MW4PR12MB71918A5EFF20C239743AC346F1FAA@MW4PR12MB7191.namprd12.prod.outlook.com>
2025-11-03 20:24 ` Aitken, Will
2025-11-06 16:27 ` Lazar, Lijo
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=20251008133225.1238028-3-will.aitken@amd.com \
--to=will.aitken@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=lijo.lazar@amd.com \
--cc=victor.skvortsov@amd.com \
--cc=wiaitken@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