Commit b6818520 authored by Trigger Huang's avatar Trigger Huang Committed by Alex Deucher
Browse files

drm/amdgpu: Add IDH_QUERY_ALIVE event for SR-IOV



SR-IOV host side will send IDH_QUERY_ALIVE to guest VM to check
if this guest VM is still alive (not destroyed). The only thing
guest KMD need to do is to send ACK back to host.

Signed-off-by: default avatarTrigger Huang <Trigger.Huang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3680624e
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -372,6 +372,9 @@ static int xgpu_ai_mailbox_rcv_irq(struct amdgpu_device *adev,
		if (amdgpu_sriov_runtime(adev))
		if (amdgpu_sriov_runtime(adev))
			schedule_work(&adev->virt.flr_work);
			schedule_work(&adev->virt.flr_work);
		break;
		break;
		case IDH_QUERY_ALIVE:
			xgpu_ai_mailbox_send_ack(adev);
			break;
		/* READY_TO_ACCESS_GPU is fetched by kernel polling, IRQ can ignore
		/* READY_TO_ACCESS_GPU is fetched by kernel polling, IRQ can ignore
		 * it byfar since that polling thread will handle it,
		 * it byfar since that polling thread will handle it,
		 * other msg like flr complete is not handled here.
		 * other msg like flr complete is not handled here.
+1 −0
Original line number Original line Diff line number Diff line
@@ -49,6 +49,7 @@ enum idh_event {
	IDH_FLR_NOTIFICATION_CMPL,
	IDH_FLR_NOTIFICATION_CMPL,
	IDH_SUCCESS,
	IDH_SUCCESS,
	IDH_FAIL,
	IDH_FAIL,
	IDH_QUERY_ALIVE,
	IDH_EVENT_MAX
	IDH_EVENT_MAX
};
};