<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=us-ascii">
<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:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:-webkit-standard;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
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.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle21
        {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.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<p style="font-family:Arial;font-size:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div class="WordSection1">
<p class="MsoNormal">Any updates on this patch?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Best Regards,<o:p></o:p></p>
<p class="MsoNormal">Li, Xin (Justin)<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Li, Xin (Justin) <Xin2.Li@amd.com><br>
<b>Date: </b>Tuesday, October 27, 2020 at 14:36<br>
<b>To: </b>amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>, Li, Xin (Justin) <Xin2.Li@amd.com>, Zhou, Tiecheng <Tiecheng.Zhou@amd.com><br>
<b>Subject: </b>[PATCH] drm/amd/amdgpu: Add checksun check for pf2vf message<o:p></o:p></span></p>
</div>
<p style="margin:5.0pt"><span style="font-family:"Arial",sans-serif;color:#0078D7">[AMD Official Use Only - Internal Distribution Only]<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-family:-webkit-standard;color:black">Add checksum checking for pf2vf message<br>
<br>
Signed-off-by: Li, Xin (Justin) <</span><a href="mailto:Xin2.Li@amd.com"><span style="font-family:-webkit-standard;color:#000064">Xin2.Li@amd.com</span></a><span style="font-family:-webkit-standard;color:black">><br>
Signed-off-by: Zhou, Tiecheng <</span><a href="mailto:Tiecheng.Zhou@amd.com"><span style="font-family:-webkit-standard;color:#000064">Tiecheng.Zhou@amd.com</span></a><span style="font-family:-webkit-standard;color:black">><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 5 ++---<br>
 1 file changed, 2 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c<br>
index 836d784456e5..bfc74533b5ee 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c<br>
@@ -450,12 +450,11 @@ static int amdgpu_virt_read_pf2vf_data(struct amdgpu_device *adev)<br>
                         ((struct amdgim_pf2vf_info_v1 *)pf2vf_info)->feature_flags;<br>
                 break;<br>
         case 2:<br>
-               /* TODO: missing key, need to add it later */<br>
                 checksum = ((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->checksum;<br>
                 checkval = amd_sriov_msg_checksum(<br>
                         adev->virt.fw_reserve.p_pf2vf, pf2vf_info->size,<br>
-                       0, checksum);<br>
-               if (checksum != checkval) {<br>
+                       adev->virt.fw_reserve.checksum_key, checksum);<br>
+               if (checksum != 0 && checksum != checkval) {<br>
                         DRM_ERROR("invalid pf2vf message\n");<br>
                         return -EINVAL;<br>
                 }<br>
--<span class="apple-converted-space"> </span><br>
2.24.3 (Apple Git-128)</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>