]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/pf: Allow to change VFs VRAM quota using sysfs
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Wed, 18 Feb 2026 20:55:46 +0000 (21:55 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 20 Feb 2026 14:50:02 +0000 (15:50 +0100)
commitb1d2746aa5af17d1c901c36564e52da5c6bedae5
tree497a2c6f5448b99e999cd4594192d472ae335b9c
parent5ae3c886a1f5d54fbd5e477bcbfb4f3154a7247e
drm/xe/pf: Allow to change VFs VRAM quota using sysfs

On current discrete platforms, PF will provision all VFs with a fair
amount of the VRAM (LMEM) during VFs enabling. However, in some cases
this automatic VRAM provisioning might be either non-reproducible or
sub-optimal. This could break VF's migration or impact performance.

Expose per-VF VRAM quota read-write sysfs attributes to allow admin
change default VRAM provisioning performed by the PF.

 /sys/bus/pci/drivers/xe/BDF/
 ├── sriov_admin/
     ├── .bulk_profile
     │   └── vram_quota                 [RW] unsigned integer
     ├── vf1/
     │   └── profile
     │       └── vram_quota             [RW] unsigned integer
     ├── vf2/
     │   └── profile
     │       └── vram_quota             [RW] unsigned integer

Above values represent total provisioned VRAM from all tiles where
VFs were assigned, and currently it's from all tiles always.

Note that changing VRAM provisioning is only possible when VF is
not running, otherwise GuC will complain. To make sure that given
VF is idle, triggering VF FLR might be needed.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patch.msgid.link/20260218205553.3561-5-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_sriov_pf_sysfs.c