STRUCT DRM_XE_VM_GET_PROPERTY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct drm_xe_vm_get_property(9) β€” Kernel API Manual ✨

Okay bestie, so this is a page straight out of the Kernel API Manual, and it's all about struct drm_xe_vm_get_property β€” the input struct for &DRM_IOCTL_XE_VM_GET_PROPERTY. Think of it as the little form you fill out when you want the driver to spill the tea about one of your VMs. πŸ«–πŸ’…


🌸 NAME

struct drm_xe_vm_get_property β€” literally the input of &DRM_IOCTL_XE_VM_GET_PROPERTY. That's it, that's the name, no cap.


✨ SYNOPSIS

       struct drm_xe_vm_get_property {
           __u64 extensions;
           __u32 vm_id;
         #define DRM_XE_VM_GET_PROPERTY_FAULTS           0;
           __u32 property;
           __u32 size;
           __u32 pad;
           union {
             __u64 data;
             __u64 value;
           };
           __u64 reserved[3];
        };

πŸŽ€ Members (the whole cast, main character energy)

  • extensions β€” pointer to the first extension struct, if there is one. Optional bestie, no pressure. πŸ¦‹
  • vm_id β€” the ID of the VM whose properties you're querying. Gotta know which VM you're being nosy about.
  • property β€” the property to get. Yes, you have to actually say what you want.
  • size β€” how much room to allocate for data. This one's lowkey the plot twist, more on that down below.
  • pad β€” MBZ. Which means "must be zero", so fill it with zeroes and move on. πŸ™ˆ
  • {unnamed_union} β€” anonymous union, no name, just vibes. It's giving mysterious. πŸ’€
    • data β€” pointer to a user-defined array, flexible in both size and type. Very "you do you" of it.
    • value β€” the return value for scalar queries. Small answers live here. πŸ“
  • reserved β€” MBZ. Again: must be zero. Not optional, bestie. 🌸

πŸ’œ Description

So here's the whole situation. The user hands over a VM and a property to query from the DRM_XE_VM_GET_PROPERTY_* fam, and sets those values in the vm_id and property members respectively. That's the setup β€” it determines both which VM you're getting the property of and which property gets reported. Two birds, iconic. 🐦✨

Now, if size is set to 0, the driver fills it in with the required size for the requested property. You're expected here to allocate memory for the property structure and then pass a pointer to that allocated memory through the data member. No skimping on the malloc, bestie. For some properties this may be zero, in which case the value of the property gets saved to the value member instead, and size will remain zero on return. Cute, right? πŸŽ€

If size is not zero, then the IOCTL will attempt to copy the requested property into the data member. Copy-paste behaviour, essentially. πŸ“‹

Failure modes, because we keep it real:

The IOCTL will return -ENOENT if the VM could not be identified from the provided VM ID, or -EINVAL if the IOCTL fails for any other reason β€” like giving an invalid size for the given property, or if the property data could not be copied into the memory allocated to the data member. πŸ’€

The property member can be:

  • DRM_XE_VM_GET_PROPERTY_FAULTS

That's the whole list. One option. She's solo but she's booked and busy. πŸ‘‘


πŸ¦‹ SEE ALSO

Kernel file ./include/uapi/drm/xe_drm.h β€” plus the entire extended universe, gathered here in one absolutely stacked lineup:

Xe Device Block Diagram(9), Xe uAPI Overview(9), Xe IOCTL Extensions(9), struct drm_xe_user_extension(9), struct drm_xe_ext_set_property(9), struct drm_xe_engine_class_instance(9), struct drm_xe_engine(9), struct drm_xe_query_engines(9), enum drm_xe_memory_class(9), struct drm_xe_mem_region(9), struct drm_xe_query_mem_regions(9), struct drm_xe_query_config(9), struct drm_xe_gt(9), struct drm_xe_query_gt_list(9), struct drm_xe_query_topology_mask(9), struct drm_xe_query_engine_cycles(9), struct drm_xe_query_uc_fw_version(9), struct drm_xe_query_pxp_status(9), struct drm_xe_device_query(9), struct drm_xe_gem_create(9), struct drm_xe_gem_mmap_offset(9), struct drm_xe_vm_create(9), struct drm_xe_vm_destroy(9), struct drm_xe_vm_bind_op(9), struct drm_xe_vm_bind(9), struct drm_xe_exec_queue_create(9), struct drm_xe_exec_queue_destroy(9), struct drm_xe_exec_queue_get_property(9), struct drm_xe_sync(9), struct drm_xe_exec(9), struct drm_xe_wait_user_fence(9), enum drm_xe_observation_type(9), enum drm_xe_observation_op(9), struct drm_xe_observation_param(9), enum drm_xe_observation_ioctls(9), enum drm_xe_oa_unit_type(9), struct drm_xe_oa_unit(9), struct drm_xe_query_oa_units(9), enum drm_xe_oa_format_type(9), enum drm_xe_oa_property_id(9), struct drm_xe_oa_config(9), struct drm_xe_oa_stream_status(9), struct drm_xe_oa_stream_info(9), enum drm_xe_pxp_session_type(9), enum drm_xe_eu_stall_property_id(9), struct drm_xe_query_eu_stall(9), struct drm_xe_madvise(9), struct drm_xe_mem_range_attr(9), struct drm_xe_vm_query_mem_range_attr(9), struct drm_xe_exec_queue_set_property(9), Xe DRM RAS(9), enum drm_xe_ras_error_severity(9), enum drm_xe_ras_error_component(9).

Like I said. Stacked. 🀯πŸ”₯


That's the whole page, bestie β€” go query some VM properties and slay πŸ’–

Source: ./include/uapi/drm Β· Dated: October 2026 Β· Filed under: struct drm_...get_property(9) β€” mwah, see u at the next manpage πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from