drm/xe/pf: Allow to trigger VF GuC state restore from debugfs
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 12 Sep 2024 20:38:17 +0000 (22:38 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 16 Sep 2024 11:00:47 +0000 (13:00 +0200)
For feature enabling and testing purposes, allow to restore saved
or replaced VF GuC state from debugfs, bypassing normal migration
flow. This is available only under strict debug config.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240912203817.1880-7-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_gt_sriov_pf_debugfs.c

index e990a63..ccbcf6e 100644 (file)
@@ -313,6 +313,9 @@ static const struct {
        { "stop", xe_gt_sriov_pf_control_stop_vf },
        { "pause", xe_gt_sriov_pf_control_pause_vf },
        { "resume", xe_gt_sriov_pf_control_resume_vf },
+#ifdef CONFIG_DRM_XE_DEBUG_SRIOV
+       { "restore!", xe_gt_sriov_pf_migration_restore_guc_state },
+#endif
 };
 
 static ssize_t control_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)