<html xmlns:v="urn:schemas-microsoft-com:vml" 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=utf-8">
<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 Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:等线;
        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:"\@等线";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:微软雅黑;
        panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
        {font-family:"\@微软雅黑";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:346714038;
        mso-list-type:hybrid;
        mso-list-template-ids:-914838272 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Instead if guest load “sos” and “sysdrv” there are two kinds of result:<o:p></o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">For elder version PSP boot loader guest would hit failure.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">For new version PSP boot loader those ucode won’t work at all so loading the is redundant
<o:p></o:p></li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">/Monk<o:p></o:p></p>
<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> Tao, Yintian <br>
<b>Sent:</b> Friday, May 17, 2019 3:17 PM<br>
<b>To:</b> Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Cc:</b> Liu, Monk <Monk.Liu@amd.com>; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> <span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif">答复</span>: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div id="divtagdefaultwrapper">
<p><span style="font-size:12.0pt;color:black">Hi  Christian<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p><span style="font-size:12.0pt;color:black">Many thanks for your review.<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p><span style="font-size:12.0pt;color:black">The background is that this bo is to let psp load sos and sysdrv but under sriov, sos and sysdrv is loaded by VBIOS or hypervisor driver.<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p><span style="font-size:12.0pt;color:black">The reason why not let guest driver to load it under SRIOV is that it is not safe.<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p><span style="font-size:12.0pt;color:black">Best Regards<o:p></o:p></span></p>
<p><span style="font-size:12.0pt;color:black">Yintian Tao<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="3" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif;color:black">发件人</span></b><b><span style="color:black">:</span></b><span style="color:black"> Koenig, Christian<br>
</span><b><span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif;color:black">发送时间</span></b><b><span style="color:black">:</span></b><span style="color:black"> 2019</span><span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif;color:black">年</span><span style="color:black">5</span><span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif;color:black">月</span><span style="color:black">17</span><span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif;color:black">日</span><span style="color:black">
 14:53:35<br>
</span><b><span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif;color:black">收件人</span></b><b><span style="color:black">:</span></b><span style="color:black"> Tao, Yintian<br>
</span><b><span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif;color:black">抄送</span></b><b><span style="color:black">:</span></b><span style="color:black"> Liu, Monk;
<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
</span><b><span lang="ZH-CN" style="font-family:"微软雅黑",sans-serif;color:black">主题</span></b><b><span style="color:black">:</span></b><span style="color:black"> Re: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV</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">Looks good to me now, but I don't know the technical background why this
<br>
BO is not needed under SRIOV.<br>
<br>
So this patch is Acked-by: Christian König <<a href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>>.<br>
<br>
Regards,<br>
Christian.<br>
<br>
Am 17.05.19 um 04:41 schrieb Tao, Yintian:<br>
> Hi Christian<br>
><br>
><br>
> I have modified it according to your suggestion. Can you help review this again? Thanks in advance.<br>
><br>
><br>
> Best Regards<br>
> Yintian Tao<br>
><br>
> -----Original Message-----<br>
> From: Yintian Tao <<a href="mailto:yttao@amd.com">yttao@amd.com</a>><br>
> Sent: Thursday, May 16, 2019 7:54 PM<br>
> To: <a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
> Cc: Tao, Yintian <<a href="mailto:Yintian.Tao@amd.com">Yintian.Tao@amd.com</a>>; Liu, Monk <<a href="mailto:Monk.Liu@amd.com">Monk.Liu@amd.com</a>><br>
> Subject: [PATCH] drm/amdgpu: skip fw pri bo alloc for SRIOV<br>
><br>
> PSP fw primary buffer is not used under SRIOV.<br>
> Therefore, we don't need to allocate memory for it.<br>
><br>
> v2: remove superfluous check for amdgpu_bo_free_kernel().<br>
><br>
> Signed-off-by: Yintian Tao <<a href="mailto:yttao@amd.com">yttao@amd.com</a>><br>
> Signed-off-by: Monk Liu <<a href="mailto:Monk.Liu@amd.com">Monk.Liu@amd.com</a>><br>
> ---<br>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 17 ++++++++++-------<br>
>   1 file changed, 10 insertions(+), 7 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
> index c567a55..af9835c 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c<br>
> @@ -905,13 +905,16 @@ static int psp_load_fw(struct amdgpu_device *adev)<br>
>        if (!psp->cmd)<br>
>                return -ENOMEM;<br>
>   <br>
> -     ret = amdgpu_bo_create_kernel(adev, PSP_1_MEG, PSP_1_MEG,<br>
> -                                     AMDGPU_GEM_DOMAIN_GTT,<br>
> -                                     &psp->fw_pri_bo,<br>
> -                                     &psp->fw_pri_mc_addr,<br>
> -                                     &psp->fw_pri_buf);<br>
> -     if (ret)<br>
> -             goto failed;<br>
> +     /* this fw pri bo is not used under SRIOV */<br>
> +     if (!amdgpu_sriov_vf(psp->adev)) {<br>
> +             ret = amdgpu_bo_create_kernel(adev, PSP_1_MEG, PSP_1_MEG,<br>
> +                                           AMDGPU_GEM_DOMAIN_GTT,<br>
> +                                           &psp->fw_pri_bo,<br>
> +                                           &psp->fw_pri_mc_addr,<br>
> +                                           &psp->fw_pri_buf);<br>
> +             if (ret)<br>
> +                     goto failed;<br>
> +     }<br>
>   <br>
>        ret = amdgpu_bo_create_kernel(adev, PSP_FENCE_BUFFER_SIZE, PAGE_SIZE,<br>
>                                        AMDGPU_GEM_DOMAIN_VRAM,<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>