STRUCT XE_PXP(9)
okay so bestie, welcome to struct xe_pxp(9) from the Kernel API Manual β and it's literally the main character of PXP state tracking π
β¨
π NAME π
struct xe_pxp β the pxp state. That's the vibe, that's the whole name, periodt. π«Ά
β¨ SYNOPSIS β¨
here's the struct in all its glory β no cap, keep it exact:
struct xe_pxp {
struct xe_device *xe;
struct xe_gt *gt;
struct {
struct xe_exec_queue *q;
struct xe_bo *bo;
} vcs_exec;
struct xe_pxp_gsc_client_resources gsc_res;
struct {
struct work_struct work;
struct workqueue_struct *wq;
atomic_t pending;
#define PXP_TERMINATION_REQUEST_IRQ BIT(0);
#define PXP_TERMINATION_REQUEST_ON_RESUME BIT(1);
#define PXP_TERMINATION_REQUEST (PXP_TERMINATION_REQUEST_IRQ |
PXP_TERMINATION_REQUEST_ON_RESUME);
#define PXP_TERMINATION_COMPLETE_IRQ BIT(2);
} events;
struct mutex mutex;
enum xe_pxp_status status;
struct completion activation;
struct completion termination;
struct {
spinlock_t lock;
struct list_head list;
} queues;
u32 key_instance;
u32 last_suspend_key_instance;
bool needs_termination_on_resume;
};
π«Ά Members π«Ά
okay bestie, let's go member by member β every single one is here, fr fr:
xeβ the backpointer to thexe_devicestruct. πgtβ pointer to thegtthat owns the submission-side of PXP (VDBOX,KCRandGSC). πvcs_execβ kernel-owned objects for PXP submissions to the VCS. β¨vcs_exec.qβ kernel-owned VCS exec queue used for PXP terminations. πvcs_exec.boβ the BO used for submissions to the VCS. π¦gsc_resβ kernel-owned objects for PXP submissions to the GSCCS. πΈeventsβ wrapper for the worker and queue used for PXP event handling. π₯events.workβ the worker that manages termination events. πevents.wqβ the workqueue on which to queue the work. πevents.pendingβ pending events. βmutexβ protects the pxp status and the queue list. πstatusβ the current pxp status. πactivationβ completion struct that tracks pxp start. π§terminationβ completion struct that tracks terminations. πqueuesβ management ofexec_queuesthat use PXP. πqueues.lockβ spinlock protecting the queue management. π₯queues.listβ list ofexec_queuesthat use PXP. π¦key_instanceβ tracks the current iteration of the PXP key. Heads up: because PXP termination and re-start take time to complete, the minimum time between2subsequent increases of this variable is50ms, and even that only if there is a continuous attack. Normal behavior? It increases much much slower than that. This means we don't expect this to ever wrap, and we don't implement that case in the code. no cap. πlast_suspend_key_instanceβ value ofkey_instanceat the last suspend. Used to check if any PXP session has been created between suspend cycles. πneeds_termination_on_resumeβ indicates if PXP termination is needed on resume. This is set if PXP was active when we suspend and it is cleared when we queue the termination on resume. Since the suspend and resume calls cannot execute at the same time, this variable does not need to be protected by the PXP lock. π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/xe/xe_pxp_types.handstruct xe_pxp_gsc_client_resources(9)β go peek, bestie. π«Ά
and that's the whole page, bestie π source/version: ./drivers/gpu/drm/xe; date: October 2026; title: struct xe_pxp(9). slay and goodbye π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms