<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Trigger Huang <Trigger.Huang@amd.com><br>
<b>Sent:</b> Tuesday, April 30, 2019 4:30 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Huang, Trigger<br>
<b>Subject:</b> [PATCH] drm/amdgpu: Add IDH_QUERY_ALIVE event for SR-IOV</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[CAUTION: External Email]<br>
<br>
SR-IOV host side will send IDH_QUERY_ALIVE to guest VM to check<br>
if this guest VM is still alive (not destroyed). The only thing<br>
guest KMD need to do is to send ACK back to host.<br>
<br>
Signed-off-by: Trigger Huang <Trigger.Huang@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 3 +++<br>
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h | 1 +<br>
 2 files changed, 4 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c<br>
index 8dbad49..2471e7c 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c<br>
@@ -372,6 +372,9 @@ static int xgpu_ai_mailbox_rcv_irq(struct amdgpu_device *adev,<br>
                if (amdgpu_sriov_runtime(adev))<br>
                        schedule_work(&adev->virt.flr_work);<br>
                break;<br>
+               case IDH_QUERY_ALIVE:<br>
+                       xgpu_ai_mailbox_send_ack(adev);<br>
+                       break;<br>
                /* READY_TO_ACCESS_GPU is fetched by kernel polling, IRQ can ignore<br>
                 * it byfar since that polling thread will handle it,<br>
                 * other msg like flr complete is not handled here.<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h<br>
index 39d151b..077e91a 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h<br>
@@ -49,6 +49,7 @@ enum idh_event {<br>
        IDH_FLR_NOTIFICATION_CMPL,<br>
        IDH_SUCCESS,<br>
        IDH_FAIL,<br>
+       IDH_QUERY_ALIVE,<br>
        IDH_EVENT_MAX<br>
 };<br>
<br>
--<br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>