<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.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@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="#954F72" 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"><span style="font-family:"-webkit-standard",serif;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",serif;color:#000064">Xin2.Li@amd.com</span></a><span style="font-family:"-webkit-standard",serif;color:black">><br>
Signed-off-by: Zhou, Tiecheng <</span><a href="mailto:Tiecheng.Zhou@amd.com"><span style="font-family:"-webkit-standard",serif;color:#000064">Tiecheng.Zhou@amd.com</span></a><span style="font-family:"-webkit-standard",serif;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>
</body>
</html>