Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe/vf: Reset VF GuC state on fini

Unlike native/PF driver, which was explicitly triggering full GuC
reset during driver unwind, the VF driver was not notifying GuC that
it is about to unwind, and this could lead GuC to access stale data,
which in turn could be interpreted as VF's malicious activity.

Add managed action to send to GuC VF_RESET message during GT unwind.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patch.msgid.link/20260122151924.3726-1-michal.wajdeczko@intel.com

+11
+11
drivers/gpu/drm/xe/xe_guc.c
··· 668 668 guc_g2g_fini(guc); 669 669 } 670 670 671 + static void vf_guc_fini_hw(void *arg) 672 + { 673 + struct xe_guc *guc = arg; 674 + 675 + xe_gt_sriov_vf_reset(guc_to_gt(guc)); 676 + } 677 + 671 678 /** 672 679 * xe_guc_comm_init_early - early initialization of GuC communication 673 680 * @guc: the &xe_guc to initialize ··· 779 772 xe->info.has_page_reclaim_hw_assist = false; 780 773 781 774 if (IS_SRIOV_VF(xe)) { 775 + ret = devm_add_action_or_reset(xe->drm.dev, vf_guc_fini_hw, guc); 776 + if (ret) 777 + goto out; 778 + 782 779 ret = xe_guc_ct_init(&guc->ct); 783 780 if (ret) 784 781 goto out;