STRUCT XE_BO(9)
β¨ NAME β¨
okay so bestie, welcome to the struct xe_bo(9) page from the Kernel API Manual π
this is literally all about the Xe buffer object β the struct that holds the tea for a buffer object, and it slay.
struct xe_bo β Xe buffer object.
π¦ SYNOPSIS π¦
here's the full struct, no cap β vibe-check every field because we are not skipping a single one:
struct xe_bo {
struct ttm_buffer_object ttm;
struct xe_bo *backup_obj;
struct xe_bo *parent_obj;
struct dma_buf *dma_buf;
u32 flags;
struct xe_vm *vm;
struct xe_tile *tile;
struct ttm_place placements[XE_BO_MAX_PLACEMENTS];
struct ttm_placement placement;
struct xe_ggtt_node *ggtt_node[XE_MAX_TILES_PER_DEVICE];
struct iosys_map vmap;
struct ttm_bo_kmap_obj kmap;
struct list_head pinned_link;
#ifdef CONFIG_PROC_FS;
struct xe_drm_client *client;
struct list_head client_link;
#endif;
struct {
u32 atomic_access;
} attr;
u32 pxp_key_instance;
struct llist_node freed;
int update_index;
bool created;
bool ccs_cleared;
struct xe_mem_pool_node *bb_ccs[XE_SRIOV_VF_CCS_CTX_COUNT];
u16 cpu_caching;
struct drm_pagemap_devmem devmem_allocation;
struct list_head vram_userfault_link;
u64 min_align;
struct {
u32 state;
u32 vma_count;
u32 willneed_count;
} purgeable;
};
π Members π
okay, member-by-member, and the way that we're covering every single one is giving responsible bestie π«Ά
ttmβ TTM base buffer object. main character energy, honestly.backup_objβ the backup object when pinned and suspended (vramonly).parent_objβ ref to the parent BO if this is abackup_obj.dma_bufβ importeddma-bufref to keep itsresvalive.flagsβ flags for this buffer object.vmβ VM this BO is attached to; forextobjthis will beNULL.tileβ tile this BO is attached to (kernel BO only).placementsβ valid placements for this BO. obsessed.placementβ current placement for this BO.ggtt_nodeβ array of GGTT nodes if this BO is mapped in the GGTTs.vmapβiosysmap of this buffer.kmapβ TTM BO kmap object for internal use only. Keep off. ngl, this is not the one to poke at π«pinned_linkβ link to present / evicted list of pinned BO.clientβxe_drm_clientwhich created the BO.client_linkβ link intoxe_drm_client.objects_list.attrβ user controlled attributes for the BO.attr.atomic_accessβ type of atomic access the BO needs, protected by the BO dma-resv lock.pxp_key_instanceβ PXP key instance this BO was created against. A0in this variable indicates that the BO does not use PXP encryption.freedβ list node for delayed put. not me forgetting the delayed put πupdate_indexβ update index if PT BO.createdβ whether the BO has passed initial creation.ccs_clearedβtruemeans that the CCS region of the BO is already cleared.bb_ccsβ BB instructions of CCS read/write. Valid only for VF.cpu_cachingβ CPU caching mode. Currently only used for userspace objects. Exceptions are system memory on DGFX, which is alwaysWB. it ate.devmem_allocationβ SVM device memory allocation. it's giving device memory realness β¨vram_userfault_linkβ link intomem_access.vram_userfault.list.min_alignβ minimum alignment needed for this BO if different from default. lowkey important.purgeableβ purgeability state and accounting.
and yes bestie, all fields are protected by the BO's dma-resv lock. fr fr π
purgeable.stateβ BO purgeability state (WILLNEED/DONTNEED/PURGED).purgeable.vma_countβ number of VMAs currently mapping this BO.purgeable.willneed_countβ number of activeWILLNEEDholders.
Counts WILLNEED VMAs plus active dma-buf exports for non-imported BOs. The BO flips to DONTNEED on a 1->0 transition only when VMAs still exist; if the last VMA is removed, the previous BO state is preserved.
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/xe/xe_bo_types.hβ iconic source-of-truth behavior, iykyk π
and that's the whole page, bestie π«Ά β the source/version is ./drivers/gpu/drm/xe, dated October 2026, and the page is struct xe_bo(9). periodt π
π¦ 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