<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
*sigh* yeah that's exactly what we have seen before as well. Let me
know when you need help with that.<br>
<br>
Regards,<br>
Christian.<br>
<br>
<div class="moz-cite-prefix">Am 29.08.23 um 08:17 schrieb Zhang,
Yifan:<br>
</div>
<blockquote type="cite" cite="mid:CY5PR12MB6369A28D10CBB70F702C507AC1E7A@CY5PR12MB6369.namprd12.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style>@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:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}@font-face
{font-family:Aptos;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}span.EmailStyle21
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div class="WordSection1">
<p class="MsoNormal">Validated on Phoenix and Raphael w/ IOMMU
remapping mode, and found random page fault when launching
Xorg. I will debug this issue and update the patch.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Best Regards,<o:p></o:p></p>
<p class="MsoNormal">Yifan<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Deucher, Alexander
<a class="moz-txt-link-rfc2396E" href="mailto:Alexander.Deucher@amd.com"><Alexander.Deucher@amd.com></a> <br>
<b>Sent:</b> Tuesday, August 29, 2023 2:06 AM<br>
<b>To:</b> Koenig, Christian
<a class="moz-txt-link-rfc2396E" href="mailto:Christian.Koenig@amd.com"><Christian.Koenig@amd.com></a>; Zhang, Yifan
<a class="moz-txt-link-rfc2396E" href="mailto:Yifan1.Zhang@amd.com"><Yifan1.Zhang@amd.com></a>; Christian König
<a class="moz-txt-link-rfc2396E" href="mailto:ckoenig.leichtzumerken@gmail.com"><ckoenig.leichtzumerken@gmail.com></a>;
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [PATCH v3 2/2] drm/amdgpu: Put page
tables to GTT memory for gfx10 onwards APUs<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:5.0pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:blue">[AMD
Official Use Only - General]<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">Technically
the AMD IOMMU uses direct mapping mode for any device
which claims to support ATS in order to support the
IOMMUv2 functionality, but that was also the case with
Raven systems which were problematic when remapping
mode was enabled. That said, now that IOMMUv2 support
has been removed, there's no reason to use direct
mapping in the IOMMU driver so that may change.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black">Alex<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Aptos",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div class="MsoNormal" style="text-align:center" align="center">
<hr width="98%" size="2" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Koenig, Christian <<a href="mailto:Christian.Koenig@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Christian.Koenig@amd.com</a>><br>
<b>Sent:</b> Monday, August 28, 2023 7:30 AM<br>
<b>To:</b> Zhang, Yifan <<a href="mailto:Yifan1.Zhang@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Yifan1.Zhang@amd.com</a>>;
Christian König <<a href="mailto:ckoenig.leichtzumerken@gmail.com" moz-do-not-send="true" class="moz-txt-link-freetext">ckoenig.leichtzumerken@gmail.com</a>>;
<a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true" class="moz-txt-link-freetext">amd-gfx@lists.freedesktop.org</a>
<<a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true" class="moz-txt-link-freetext">amd-gfx@lists.freedesktop.org</a>><br>
<b>Cc:</b> Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Alexander.Deucher@amd.com</a>><br>
<b>Subject:</b> Re: [PATCH v3 2/2] drm/amdgpu: Put
page tables to GTT memory for gfx10 onwards APUs</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Well,
there seems to be a very basic misunderstood here: The
IOMMU
<br>
isolation level is *not* ASIC dependent!<br>
<br>
Try to set amd_iommu=force_isolation on the kernel
command line.<br>
<br>
This is a configuration option customers can use to
harden their systems <br>
and when this isn't properly tested we can't allow
page tables in system <br>
memory.<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 28.08.23 um 13:23 schrieb Zhang, Yifan:<br>
> [Public]<br>
><br>
> Not yet. It will be only enabled for gfx10.3.3
and later APU initially, IOMMU is pass through in
these ASIC.<br>
><br>
> -----Original Message-----<br>
> From: Christian König <<a href="mailto:ckoenig.leichtzumerken@gmail.com" moz-do-not-send="true" class="moz-txt-link-freetext">ckoenig.leichtzumerken@gmail.com</a>><br>
> Sent: Monday, August 28, 2023 5:41 PM<br>
> To: Zhang, Yifan <<a href="mailto:Yifan1.Zhang@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Yifan1.Zhang@amd.com</a>>;
<a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true" class="moz-txt-link-freetext">amd-gfx@lists.freedesktop.org</a><br>
> Cc: Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Alexander.Deucher@amd.com</a>>;
Koenig, Christian <<a href="mailto:Christian.Koenig@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Christian.Koenig@amd.com</a>><br>
> Subject: Re: [PATCH v3 2/2] drm/amdgpu: Put page
tables to GTT memory for gfx10 onwards APUs<br>
><br>
> Is that now validated with IOMMU in non pass
through mode?<br>
><br>
> Christian.<br>
><br>
> Am 28.08.23 um 10:58 schrieb Zhang, Yifan:<br>
>> [AMD Official Use Only - General]<br>
>><br>
>> Ping<br>
>><br>
>> -----Original Message-----<br>
>> From: Zhang, Yifan <<a href="mailto:Yifan1.Zhang@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Yifan1.Zhang@amd.com</a>><br>
>> Sent: Friday, August 25, 2023 8:34 AM<br>
>> To: <a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true" class="moz-txt-link-freetext">amd-gfx@lists.freedesktop.org</a><br>
>> Cc: Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Alexander.Deucher@amd.com</a>>;
Koenig, Christian <<a href="mailto:Christian.Koenig@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Christian.Koenig@amd.com</a>>;
Zhang, Yifan <<a href="mailto:Yifan1.Zhang@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">Yifan1.Zhang@amd.com</a>><br>
>> Subject: [PATCH v3 2/2] drm/amdgpu: Put page
tables to GTT memory for gfx10 onwards APUs<br>
>><br>
>> To decrease VRAM pressure for APUs, put page
tables to GTT domain for gfx10 and newer APUs.<br>
>><br>
>> v2: only enable it for gfx10 and newer APUs
(Alex, Christian)<br>
>><br>
>> Signed-off-by: Yifan Zhang <<a href="mailto:yifan1.zhang@amd.com" moz-do-not-send="true" class="moz-txt-link-freetext">yifan1.zhang@amd.com</a>><br>
>> ---<br>
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
| 9 ++++++---<br>
>> 1 file changed, 6 insertions(+), 3
deletions(-)<br>
>><br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c<br>
>> index 96d601e209b8..4603d87c61a0 100644<br>
>> ---
a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c<br>
>> +++
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c<br>
>> @@ -515,10 +515,13 @@ int
amdgpu_vm_pt_create(struct amdgpu_device *adev, struct
amdgpu_vm *vm,<br>
>> bp.size = amdgpu_vm_pt_size(adev,
level);<br>
>> bp.byte_align =
AMDGPU_GPU_PAGE_SIZE;<br>
>><br>
>> - if (!adev->gmc.is_app_apu)<br>
>> - bp.domain =
AMDGPU_GEM_DOMAIN_VRAM;<br>
>> - else<br>
>> + if (adev->gmc.is_app_apu ||<br>
>> + ((adev->flags &
AMD_IS_APU) &&<br>
>> +
(adev->ip_versions[GC_HWIP][0] >= IP_VERSION(10,
3, 3))))<br>
>> bp.domain =
AMDGPU_GEM_DOMAIN_GTT;<br>
>> + else<br>
>> + bp.domain =
AMDGPU_GEM_DOMAIN_VRAM;<br>
>> +<br>
>><br>
>> bp.domain =
amdgpu_bo_get_preferred_domain(adev, bp.domain);<br>
>> bp.flags =
AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |<br>
>> --<br>
>> 2.37.3<br>
>><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>