STRUCT GUC_STATE_CAPTURE_HEADER_T(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct guc_state_capture_header_t β€” State capture header πŸ’…

okay bestie so this is a page out of the Kernel API Manual (section 9, the big-kid kernel-guts section, iykyk), and it's literally all about struct guc_state_capture_header_t β€” the state capture header ✨. no cap, that's the whole vibe. let's get into it 🫢


πŸŽ€ SYNOPSIS πŸŽ€

here's the shape of it, copy-pasted exactly so you don't gotta squint at anything πŸ’–:

struct guc_state_capture_header_t {
    u32 owner;
  #define GUC_STATE_CAPTURE_HEADER_VFID GENMASK(7, 0);
    u32 info;
  #define GUC_STATE_CAPTURE_HEADER_CAPTURE_TYPE GENMASK(3, 0) ;
  #define GUC_STATE_CAPTURE_HEADER_ENGINE_CLASS GENMASK(7, 4) ;
  #define GUC_STATE_CAPTURE_HEADER_ENGINE_INSTANCE GENMASK(11, 8);
    u32 lrca;
    u32 guc_id;
    u32 num_mmio_entries;
  #define GUC_STATE_CAPTURE_HEADER_NUM_MMIO_ENTRIES GENMASK(9, 0);
 };

like… she's got masks on masks, the bitfield energy is immaculate 🌈


✨ Members ✨

  • owner β€” the VFID lives in BR[ 7: 0] πŸ¦‹. if SRIOV is disabled it's MBZ (must be zero, bestie, don't be weird about it). if SRIOV is enabled, VFID is an integer in the range [0, 63] β€” and 0 means this state capture belongs to the PF, while an integer N in the range [1, 63] means the state capture is for VF N πŸ‘‘
  • info β€” engine class / instance plus capture type info 🧚 that's the whole little info packet.
  • lrca β€” logical ring context address. if it's a type-instance, this is the LRCA (address) that hung; otherwise it gets set to ~0 πŸ’€
  • guc_id β€” context_index. if it's a type-instance, this is the context index of the hung context; otherwise it gets set to ~0 πŸ™ˆ
  • num_mmio_entries β€” the number of captured MMIO entries. that's it, that's the number πŸ”₯

πŸ’œ Description πŸ’œ

so here's the story 🌸: before the kernel resets engines that have hung or faulted, the GuC microkernel reports the engine error-state β€” literally the register values that were read β€” by logging them into the shared GuC log buffer, using this whole hierarchy of structures. it's giving "receipts before the reset," and honestly? iconic πŸ‘‘


πŸ“ SEE ALSO πŸ“

go look at the kernel file ./drivers/gpu/drm/xe/abi/guc_capture_abi.h, plus all these besties:

  • struct guc_mmio_reg(9)
  • struct guc_mmio_reg_set(9)
  • struct guc_debug_capture_list_header(9)
  • struct guc_debug_capture_list(9)
  • struct guc_state_capture_t(9)
  • struct guc_state_capture_group_header_t(9)
  • struct guc_state_capture_group_t(9)

ngl the whole squad is here β€” read them together or you're only getting half the lore 🫢

and that's the page, bestie! πŸŽ€ this came from ./drivers/gpu/drm/xe/abi, dated October 2026, and the header up top was struct guc_...ure_header_t(9) (Kernel API Manual, section 9) β€” the truncated-name thing is just how the title got squished, she's still the same struct πŸ’– slay, go read your abi headers ✨

πŸ“¦ where this page comes from