STRUCT XE_PXP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 the xe_device struct. πŸŒ€
  • gt β€” pointer to the gt that owns the submission-side of PXP (VDBOX, KCR and GSC). πŸ‘‘
  • 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 of exec_queues that use PXP. πŸŽ€
  • queues.lock β€” spinlock protecting the queue management. πŸ”₯
  • queues.list β€” list of exec_queues that 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 between 2 subsequent increases of this variable is 50ms, 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 of key_instance at 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.h and struct 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