<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="en-CN" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<p style="font-family:Calibri;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - AMD Internal Distribution Only]<br>
</p>
<br>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Aptos",sans-serif">Hi
<a id="OWAAM9777098A1C45D44DAAA7EEFF1F8C6305" href="mailto:Christian.Koenig@amd.com">
<span style="font-family:"Aptos",sans-serif;text-decoration:none">@Koenig, Christian</span></a> and
<a id="OWAAMF184118DAD54A4429B35D20D9CFA1F2D" href="mailto:Lijo.Lazar@amd.com"><span style="font-family:"Aptos",sans-serif;text-decoration:none">@Lazar, Lijo</span></a>,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Aptos",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Aptos",sans-serif">Ping…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Aptos",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Aptos",sans-serif">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Aptos",sans-serif">Sam<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Aptos",sans-serif"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">From:
</span></b><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">Zhang, Owen(SRDC) <Owen.Zhang2@amd.com><br>
<b>Date: </b>Wednesday, May 14, 2025 at 18:07<br>
<b>To: </b>Koenig, Christian <Christian.Koenig@amd.com>, Zhang, GuoQing (Sam) <GuoQing.Zhang@amd.com>, amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>, Lazar, Lijo <Lijo.Lazar@amd.com><br>
<b>Cc: </b>Zhao, Victor <Victor.Zhao@amd.com>, Chang, HaiJun <HaiJun.Chang@amd.com>, Zhang, GuoQing (Sam) <GuoQing.Zhang@amd.com>, Deucher, Alexander <Alexander.Deucher@amd.com>, Ma, Qing (Mark) <Qing.Ma@amd.com><br>
<b>Subject: </b>RE: [PATCH v5 0/4] enable xgmi node migration support for hibernate on SRIOV.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><a name="BM_BEGIN"></a><span style="font-family:"Times New Roman",serif">[AMD Official Use Only - AMD Internal Distribution Only]<br>
<br>
Hi, @Koenig, Christian @Lazar, Lijo kindly pls provide your expertise for the Sam's update below. Thanks for your support.<br>
<br>
<br>
Rgds/Owen<br>
<br>
-----Original Message-----<br>
From: Samuel Zhang <guoqing.zhang@amd.com><br>
Sent: Monday, May 12, 2025 2:42 PM<br>
To: amd-gfx@lists.freedesktop.org<br>
Cc: Zhao, Victor <Victor.Zhao@amd.com>; Chang, HaiJun <HaiJun.Chang@amd.com>; Zhang, GuoQing (Sam) <GuoQing.Zhang@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Owen(SRDC) <Owen.Zhang2@amd.com>;
 Ma, Qing (Mark) <Qing.Ma@amd.com><br>
Subject: [PATCH v5 0/4] enable xgmi node migration support for hibernate on SRIOV.<br>
<br>
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 FB aperture gpu address of VRAM BOs will also change.<br>
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.<br>
<br>
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.<br>
<br>
For psp and smu, pdb0's gpu address does not work, so the original FB aperture gpu address is used instead. They need to be updated when resume with changed vGPUs.<br>
<br>
v2:<br>
- remove physical_node_id_changed<br>
- set vram_start to 0 to switch cached gpu addr to gart aperture<br>
- cleanup pdb0 patch<br>
v3:<br>
- remove gmc_v9_0_init_sw_mem_ranges() call<br>
- remove vram_offset memeber<br>
- add 4 refactoring patch to remove cached gpu addr<br>
- cleanup pdb0 patch<br>
v4:<br>
- remove gmc_v9_0_mc_init() call and `refresh` update.<br>
- do not set `fb_start` in mmhub_v1_8_get_fb_location() when pdb0 enabled.<br>
v5:<br>
- add amdgpu_virt_xgmi_migrate_enabled() check<br>
- move vram_base_offset update to pdb0 patch<br>
- remove 4 refactoring patches to remove cached gpu addr<br>
- add patch to fix IH not working issue when resume with new VF<br>
<br>
Samuel Zhang (4):<br>
  drm/amdgpu: update xgmi info on resume<br>
  drm/amdgpu: update GPU addresses for SMU and PSP<br>
  drm/amdgpu: enable pdb0 for hibernation on SRIOV<br>
  drm/amdgpu: fix fence fallback timer expired error<br>
<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 27 ++++++++++++++++++<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c    | 32 +++++++++++++++++-----<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h    |  1 +<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c    |  2 +-<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h    |  1 +<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 20 ++++++++++++++  drivers/gpu/drm/amd/amdgpu/amdgpu_object.h |  1 +<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c    | 27 ++++++++++++++++++<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c  |  3 ++<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h   |  7 +++++<br>
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c   |  2 +-<br>
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c      | 16 ++++++++---<br>
 drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c    |  6 ++--<br>
 drivers/gpu/drm/amd/amdgpu/vega20_ih.c     |  4 +++<br>
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c  | 18 ++++++++++++<br>
 15 files changed, 152 insertions(+), 15 deletions(-)<br>
<br>
--<br>
2.43.5</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>