]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Avoid touching consumer fields in GuC pagefault ack
authorMatthew Brost <matthew.brost@intel.com>
Thu, 12 Feb 2026 20:42:27 +0000 (12:42 -0800)
committerMatthew Brost <matthew.brost@intel.com>
Fri, 13 Feb 2026 20:03:47 +0000 (12:03 -0800)
The GuC pagefault acknowledgment code is designed to extract the fields
needed for the acknowledgment from the producer-stored message so that
the consumer fields can be overloaded to return additional information.
The ASID is stored in the producer message; extract it from there to
future‑proof this logic.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Link: https://patch.msgid.link/20260212204227.2764054-3-matthew.brost@intel.com
drivers/gpu/drm/xe/xe_guc_pagefault.c

index 1166b0a5fa21711c009dfd55b94349d6ec4c42f3..d48f6ed103bb84af9882309985b2bbae9b2bafb9 100644 (file)
@@ -17,6 +17,7 @@ static void guc_ack_fault(struct xe_pagefault *pf, int err)
        u32 pdata = FIELD_GET(PFD_PDATA_LO, pf->producer.msg[0]) |
                (FIELD_GET(PFD_PDATA_HI, pf->producer.msg[1]) <<
                 PFD_PDATA_HI_SHIFT);
+       u32 asid = FIELD_GET(PFD_ASID, pf->producer.msg[1]);
        u32 action[] = {
                XE_GUC_ACTION_PAGE_FAULT_RES_DESC,
 
@@ -24,7 +25,7 @@ static void guc_ack_fault(struct xe_pagefault *pf, int err)
                FIELD_PREP(PFR_SUCCESS, !!err) |
                FIELD_PREP(PFR_REPLY, PFR_ACCESS) |
                FIELD_PREP(PFR_DESC_TYPE, FAULT_RESPONSE_DESC) |
-               FIELD_PREP(PFR_ASID, pf->consumer.asid),
+               FIELD_PREP(PFR_ASID, asid),
 
                FIELD_PREP(PFR_VFID, vfid) |
                FIELD_PREP(PFR_ENG_INSTANCE, engine_instance) |