All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] enable switching to new gpu index for hibernate on SRIOV.
@ 2025-04-14 10:46 Samuel Zhang
  2025-04-14 10:46 ` [PATCH 1/6] drm/amdgpu: update XGMI physical node id and GMC configs on resume Samuel Zhang
                   ` (6 more replies)
  0 siblings, 7 replies; 27+ messages in thread
From: Samuel Zhang @ 2025-04-14 10:46 UTC (permalink / raw)
  To: amd-gfx; +Cc: victor.zhao, haijun.chang, emily.deng, guoqing.zhang

On SRIOV and VM environment, customer may need to switch to new vGPU indexes
after hibernate and then resume the VM. For GPUs with XGMI, `vram_start` will 
change in this case, the VRAM aperture gpu address of VRAM BOs will also change.
These gpu addresses need to be updated when resume. But these addresses are all
over the KMD codebase, updating each of them is error-prone and not acceptable. 

The solution is to use pdb0 page table to cover both vram and gart memory and
use pdb0 virtual gpu address instead. When gpu indexes change, the virtual gpu 
address won't change.

For psp and smu, pdb0's gpu address does not work, so the original gpu address
is used instead. They need to be updated when resume with changed vGPUs.

The last 2 patches fix the issues we hit when testing this feature.

Samuel Zhang (6):
  drm/amdgpu: update XGMI physical node id and GMC configs on resume
  drm/amdgpu: update cached GPU addresses for PSP and ucode
  drm/amdgpu: update cached GPU addresses for SMU
  drm/amdgpu: enable pdb0 for hibernation on SRIOV
  drm/amdgpu: fix sdma ring test fail when resume from hibernation
  drm/amdgpu: fix fence fallback timer expired error

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 25 ++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c    | 45 +++++++++++++++-------
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h    |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c    |  7 +++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h    |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c |  8 +++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c    | 24 ++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c  |  3 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.h   |  2 +
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c   |  2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c      | 39 +++++++++++++------
 drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c    | 30 ++++++++++++---
 drivers/gpu/drm/amd/amdgpu/vega20_ih.c     | 18 ++++++++-
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c  | 30 +++++++++++++++
 14 files changed, 199 insertions(+), 36 deletions(-)

-- 
2.43.5


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2025-05-08 10:23 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 10:46 [PATCH 0/6] enable switching to new gpu index for hibernate on SRIOV Samuel Zhang
2025-04-14 10:46 ` [PATCH 1/6] drm/amdgpu: update XGMI physical node id and GMC configs on resume Samuel Zhang
2025-04-16 13:40   ` Christian König
2025-04-14 10:46 ` [PATCH 2/6] drm/amdgpu: update cached GPU addresses for PSP and ucode Samuel Zhang
2025-04-14 10:46 ` [PATCH 3/6] drm/amdgpu: update cached GPU addresses for SMU Samuel Zhang
2025-04-14 10:46 ` [PATCH 4/6] drm/amdgpu: enable pdb0 for hibernation on SRIOV Samuel Zhang
2025-04-16 13:52   ` Christian König
2025-04-18  6:26     ` Zhang, GuoQing (Sam)
2025-04-22 10:38       ` Zhang, GuoQing (Sam)
2025-04-23  6:39         ` Liu, Monk
2025-04-23  7:25     ` Zhang, GuoQing (Sam)
2025-04-24  3:38       ` Zhang, GuoQing (Sam)
2025-04-28 10:13         ` Zhang, Owen(SRDC)
2025-04-28 11:29         ` Christian König
2025-04-30 10:30           ` Zhang, GuoQing (Sam)
2025-04-14 10:46 ` [PATCH 5/6] drm/amdgpu: fix sdma ring test fail when resume from hibernation Samuel Zhang
2025-04-16 13:53   ` Christian König
2025-04-14 10:46 ` [PATCH 6/6] drm/amdgpu: fix fence fallback timer expired error Samuel Zhang
2025-04-16 13:54   ` Christian König
2025-04-23  6:58     ` Zhang, GuoQing (Sam)
2025-04-24  3:38       ` Zhang, GuoQing (Sam)
2025-04-28 10:12         ` Zhang, Owen(SRDC)
2025-04-28 12:24         ` Christian König
2025-04-29  2:43           ` Chang, HaiJun
2025-05-08  6:53             ` Zhang, GuoQing (Sam)
2025-05-08 10:22               ` Zhang, GuoQing (Sam)
2025-04-16 10:42 ` [PATCH 0/6] enable switching to new gpu index for hibernate on SRIOV Zhang, GuoQing (Sam)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.