]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/pf: Don't attempt to process FAST_REQ or EVENT relays
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 27 May 2026 18:37:35 +0000 (20:37 +0200)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 2 Jul 2026 10:29:43 +0000 (12:29 +0200)
Currently defined VF/PF relay actions use regular REQUEST messages
only and the PF shouldn't attempt to handle FAST_REQUEST nor EVENT
messages as this would result in breaking the VFPF ABI protocol
and also might trigger an assert on the PF side.

Fixes: 98e62805921c ("drm/xe/pf: Add SR-IOV GuC Relay PF services")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patch.msgid.link/20260527183735.22616-1-michal.wajdeczko@intel.com
(cherry picked from commit 1714d360fc5ae2e0886a69e979095d9c7ff3568a)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
drivers/gpu/drm/xe/xe_guc_relay.c

index 577a315854afcf06e6ffe38f8806f3c7545927aa..eed0a750d2eb2af2a69999b055d9a426e7e53723 100644 (file)
@@ -689,12 +689,17 @@ static int relay_action_handler(struct xe_guc_relay *relay, u32 origin,
                return relay_testloop_action_handler(relay, origin, msg, len, response, size);
 
        type = FIELD_GET(GUC_HXG_MSG_0_TYPE, msg[0]);
+       relay_assert(relay, guc_hxg_type_is_action(type));
 
-       if (IS_SRIOV_PF(relay_to_xe(relay)))
-               ret = xe_gt_sriov_pf_service_process_request(gt, origin, msg, len, response, size);
-       else
+       if (IS_SRIOV_PF(relay_to_xe(relay))) {
+               if (type == GUC_HXG_TYPE_REQUEST)
+                       ret = xe_gt_sriov_pf_service_process_request(gt, origin, msg, len,
+                                                                    response, size);
+               else
+                       ret = -EOPNOTSUPP;
+       } else {
                ret = -EOPNOTSUPP;
-
+       }
        if (type == GUC_HXG_TYPE_EVENT)
                relay_assert(relay, ret <= 0);