STRUCT XE_GT(9)
π struct xe_gt(9) π
okay so this is from the Kernel API Manual, and it's the whole entire teardown of struct xe_gt β buckle up bestie, it's a big one π
β¨ NAME β¨
struct xe_gt β a "Graphics Technology" unit of the GPU. yes that's literally the name. it's giving main character energy and honestly? deserved π
πΈ SYNOPSIS πΈ
struct xe_gt {
struct xe_tile *tile;
struct {
enum xe_gt_type type;
u32 reference_clock;
u32 timestamp_base;
u64 engine_mask;
u32 gmdid;
u16 multi_queue_engine_class_mask;
u8 id;
u8 has_indirect_ring_state:1;
u8 has_uncorrectable_error_reporting:1;
u8 has_xe2_blt_instructions:1;
u8 num_geometry_xecore_fuse_regs;
u8 num_compute_xecore_fuse_regs;
} info;
#if IS_ENABLED(CONFIG_DEBUG_FS);
struct xe_gt_stats __percpu *stats;
#endif;
struct xe_mmio mmio;
struct {
struct xe_force_wake fw;
} pm;
union {
struct xe_gt_sriov_pf pf;
struct xe_gt_sriov_vf vf;
} sriov;
struct xe_reg_sr reg_sr;
struct {
struct work_struct worker;
} reset;
struct xe_tlb_inval tlb_inval;
u32 ccs_mode;
struct {
struct xe_sa_manager *bb_pool;
struct xe_hw_engine *paging_hwe0;
u32 paging_logical_mask;
} usm;
struct workqueue_struct *ordered_wq;
struct xe_uc uc;
struct xe_gt_idle gtidle;
const struct xe_exec_queue_ops *exec_queue_ops;
const struct xe_ring_ops *ring_ops[XE_ENGINE_CLASS_MAX];
struct xe_hw_fence_irq fence_irq[XE_ENGINE_CLASS_MAX];
void *default_lrc[XE_ENGINE_CLASS_MAX];
struct xe_hw_engine hw_engines[XE_NUM_HW_ENGINES];
struct xe_hw_engine_class_intf eclass[XE_ENGINE_CLASS_MAX];
struct kobject *sysfs;
struct kobject *freq;
struct {
u8 uc_index;
u8 wb_index;
} mocs;
struct {
xe_dss_mask_t g_dss_mask;
xe_dss_mask_t c_dss_mask;
xe_eu_mask_t eu_mask_per_dss;
xe_l3_bank_mask_t l3_bank_mask;
enum xe_gt_eu_type eu_type;
} fuse_topo;
struct {
const struct xe_mmio_range *ranges;
u16 group_target;
u16 instance_target;
bool initialized;
} steering[NUM_STEERING_TYPES];
unsigned int steering_dss_per_grp;
spinlock_t mcr_lock;
spinlock_t global_invl_lock;
struct {
unsigned long *gt;
unsigned long *engine;
unsigned long *lrc;
unsigned long *oob;
bool oob_initialized;
} wa_active;
struct {
unsigned long *gt;
unsigned long *engine;
unsigned long *lrc;
} tuning_active;
struct {
u64 mask;
u8 instances_per_class[XE_ENGINE_CLASS_MAX];
} user_engines;
struct xe_oa_gt oa;
struct xe_eu_stall_gt *eu_stall;
};
like, look at her. so many fields. she's full of secrets π
π¦ Members π¦
okay we're going through every single one, no skipping, i promised π«Ά
tileβ backpointer to GT's tile. she knows where she came from fr fr.infoβ the GT info bundle β¨info.typeβ the type of GTinfo.reference_clockβ clock frequencyinfo.timestamp_baseβ the GT timestamp baseinfo.engine_maskβ mask of engines present on GT. heads up tho: some of them may be reserved in runtime and not available for user. seeuser_engines.mask(it's the honest one)info.gmdidβ rawGMD_IDvalue straight from hardware, no filter no editsinfo.multi_queue_engine_class_maskβ bitmask of engine classes with multi queue support enabledinfo.idβ unique ID of this GT within the PCI Device. she's the only one of her πinfo.has_indirect_ring_stateβ GT has indirect ring state supportinfo.has_uncorrectable_error_reportingβ GT has uncorrectable error reporting supportinfo.has_xe2_blt_instructionsβ GT supports Xe2-styleMEM_SETandMEM_COPYblitter functionality. β οΈ and note this: despite the name, some Xe1 platforms may also support this "Xe2-style" feature. the name is a lie, the feature is real, iykykinfo.num_geometry_xecore_fuse_regsβ number of 32b-bit fuse registers the geometry XeCore mask spans. (yes, "32b-bit". i'm copying it exactly, don't come for me π)info.num_compute_xecore_fuse_regsβ number of 32b-bit fuse registers the compute XeCore mask spansstatsβ GT stats. only exists whenCONFIG_DEBUG_FSis enabled, she's conditional πmmioβ mmio info for GT. all GTs within a tile share the same register space, but they each get their own copy of GSI registers at a specific offset. sharing is caring but also boundaries βpmβ power management info for GT. the driver uses the GT's "force wake" interface to wake up specific parts of the GT hardware from C6 sleep states and keep the hardware awake while it's being actively used. literally "wake up bestie, we're going hardware" energypm.fwβ force wake for GTsriovβ virtualization data related to GTsriov.pfβ PF data. valid only if driver is running as PFsriov.vfβ VF data. valid only if driver is running as VFreg_srβ table with registers to be restored on GT init/resume/reset. the "remember this for later" list β¨resetβ state for GT resetsreset.workerβ the work item so GT resets can be done async, which lets reset code safely flush all code pathstlb_invalβ TLB invalidation stateccs_modeβ number of compute engines enabled. allows fixed mapping of available compute slices to compute engines. by default only the first available compute engine is enabled and all available compute slices are allocated to it. one engine, everything, no notes πusmβ unified shared memory stateusm.bb_poolβ pool from which batchbuffers for USM operations (e.g. migrations, fixing page tables) are allocated. a dedicated pool is needed so USM operations don't get blocked behind any user operations which may have resulted in a fault. personal lane, no traffic ππ¨usm.paging_hwe0β the first designated paging engine. this is some reserved BCS instance used for USM operations (e.g. migrations, fixing page tables)usm.paging_logical_maskβ logical mask of paging engines. should be densely populatedordered_wqβ used to serialize GT resets and TDRs. queue discipline, we love to see itucβ micro controllers on the GTgtidleβ idle properties of GTexec_queue_opsβ submission backend exec queue operationsring_opsβ ring operations for this hw engine (1 per engine class)fence_irqβ fence IRQs (1 per engine class)default_lrcβ default LRC statehw_enginesβ hardware engines on the GTeclassβ per hardware engine class interface on the GTsysfsβ sysfs' kobj used byxe_gt_sysfsfreqβ main GT freq sysfs control. turn it up πmocsβ infomocs.uc_indexβ UC indexmocs.wb_indexβ WB index, only used onL3_CCSplatformsfuse_topoβ GT topology reported by fuse registersfuse_topo.g_dss_maskβ dual-subslices usable by geometryfuse_topo.c_dss_maskβ dual-subslices usable by computefuse_topo.eu_mask_per_dssβ EU mask per DSSfuse_topo.l3_bank_maskβ L3 bank maskfuse_topo.eu_typeβ type/width of EU stored infuse_topo.eu_mask_per_dsssteeringβ register steering for individual HW unitssteering.rangesβ register ranges used for this steering typesteering.group_targetβ target to steer accesses tosteering.instance_targetβ instance to steer accesses tosteering.initializedβ whether this steering range is initializedsteering_dss_per_grpβ number of DSS per steering group (gslice, cslice, etc.)mcr_lockβ protects theMCR_SELECTORregister for the duration of a steered operation. don't touch, she's busy πglobal_invl_lockβ protects the register for the duration of a global invalidation of l2 cachewa_activeβ keeps track of active workaroundswa_active.gtβ bitmap with active GT workaroundswa_active.engineβ bitmap with active engine workaroundswa_active.lrcβ bitmap with active LRC workaroundswa_active.oobβ bitmap with active OOB workaroundswa_active.oob_initializedβ marks oob as initialized to help detect misuse ofXE_GT_WAβ it can only be called on initialization after OOB WAs have been processed. β οΈ don't be that guytuning_activeβ keeps track of active tuningstuning_active.gtβ bitmap with active GT tuningstuning_active.engineβ bitmap with active engine tuningstuning_active.lrcβ bitmap with active LRC tuningsuser_enginesβ engines present in GT and available to userspaceuser_engines.maskβ likeinfo.engine_mask, but only takes into consideration engines available to userspace. the curated list πuser_engines.instances_per_classβ aggregates per class the number of engines available to userspaceoaβ oa observation subsystem per gt infoeu_stallβ EU stall counters subsystem per gt info
π Description π
so, what is a GT? a GT ("Graphics Technology") is the subset of a GPU primarily responsible for implementing the graphics, compute, and/or media IP. she encapsulates the hardware engines, the programmable execution units, and the GuC π§
and like β each GT has its own handling of power management (RC6+forcewake) and its own multicast register steering. independent queen behavior, no cap β¨
a GPU/tile may have a single GT that supplies all graphics, compute, and media functionality β OR β the graphics/compute and media may be split into separate GTs within a tile. either way, she slays π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/xe/xe_gt_types.hβ go read it, bestie, it's right there π«Ά
okay that's the whole page!! and for the cute sign-off: this little masterpiece lives down at ./drivers/gpu/drm/xe, dated October 2026 in the Kernel API Manual π go forth and understand your GTs πβ¨πΈ
π¦ 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