AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Disable xgmi link status for VFs
@ 2026-02-03 15:42 silouis
  0 siblings, 0 replies; only message in thread
From: silouis @ 2026-02-03 15:42 UTC (permalink / raw)
  To: amd-gfx; +Cc: will.aitken, vskvorts, lijo.lazar, Simon Louis

From: Simon Louis <silouis@amd.com>

Xgmi link status is unavailable in guest. This patch returns
XGMI_LINK_NA for VFs when in SRIOV.

Signed-off-by: Simon Louis <silouis@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index aad530c46a9f..7a24fcc41638 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -44,6 +44,7 @@
 #define XGMI_STATE_LS0                          0x81
 #define XGMI_LINK_ACTIVE			1
 #define XGMI_LINK_INACTIVE			0
+#define XGMI_LINK_NA				2
 
 static DEFINE_MUTEX(xgmi_mutex);
 
@@ -349,6 +350,9 @@ int amdgpu_get_xgmi_link_status(struct amdgpu_device *adev, int global_link_num)
 {
 	u32 xgmi_state_reg_val;
 
+	if (amdgpu_sriov_vf(adev))
+		return XGMI_LINK_NA;
+
 	if (adev->gmc.xgmi.num_physical_nodes <= 1)
 		return -EINVAL;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-02-03 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-03 15:42 [PATCH] drm/amdgpu: Disable xgmi link status for VFs silouis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox