[PATCH] drm/xe: Enable SR-IOV for PTL

Bernatowicz, Marcin marcin.bernatowicz at linux.intel.com
Fri Feb 7 13:29:41 UTC 2025



On 2/6/2025 10:45 PM, Michal Wajdeczko wrote:
> We should now have sufficient changes in the driver to run it on
> PTL platforms in the SR-IOV Physical Function (PF) mode, that would
> allow us to enable SR-IOV Virtual Functions (VFs), and successfully
> probe our driver in the VF mode on enabled VF devices.
> 
> To unblock SR-IOV PF mode you need to load xe with modparam:
> 
>   xe.max_vfs=7
> 
> Then to enable VFs it is sufficient to use:
> 
>   $ echo 7 > /sys/bus/pci/devices/0000:00:02.0/sriov_numvfs
> 
> Note that in default auto-provisioning all VFs are allocated with
> some amount of shared resources (like unlimited GPU execution and
> preemption times, fair GGTT space, fair GuC context IDs range, ...)
> 
> However with CONFIG_DEBUG_FS enabled it is possible to tweak most
> of the SR-IOV configuration parameters using attributes like:
> 
>   /sys/kernel/debug/dri/0000:00:02.0/gt0/
>   ├── pf
>   │   ├── contexts_spare
>   │   ├── doorbells_spare
>   │   ├── exec_quantum_ms
>   │   ├── ggtt_spare
>   │   ├── preempt_timeout_us
>   │   ├── sched_priority
>   │   └── ...
>   ├── vf1
>   │   ├── contexts_quota
>   │   ├── doorbells_quota
>   │   ├── exec_quantum_ms
>   │   ├── ggtt_quota
>   │   ├── preempt_timeout_us
>   │   ├── sched_priority
>   │   └── ...
>   ├── vf2
>   │   └── ...
>   :
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> Cc: Thomas Hellstrom <thomas.hellstrom at linux.intel.com>
> ---
> Cc: Piotr Piórkowski <piotr.piorkowski at intel.com>
> Cc: Jakub Kolakowski <jakub1.kolakowski at intel.com>
> Cc: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
> ---
>   drivers/gpu/drm/xe/xe_pci.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index e8ef7d6b4db8..6a8e82aff385 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -367,6 +367,7 @@ static const struct xe_device_desc ptl_desc = {
>   	PLATFORM(PANTHERLAKE),
>   	.dma_mask_size = 46,
>   	.has_display = true,
> +	.has_sriov = true,

LGTM,

        name: ptl_vm_bat_results on xe-pw-144449v1
        ----  --------------------
        pass:                  227
        fail:                    0
       crash:                    0
        skip:                   86  (all expected skips: 
fbdev(5),kms(58),PF tests(3), xe_gt_freq(3), xe_evict(11), xe_pat(3), 
xe_pm_residency(1), xe_mmap at vram(1), xe_live_ktest at xe_migrate(1))
     timeout:                    0
        warn:                    0
  incomplete:                    0
  dmesg-warn:                    0
  dmesg-fail:                    0
     changes:                    0
       fixes:                    0
regressions:                    0
       total:                  313
        time:             00:00:49


Tested-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>

>   	.require_force_probe = true,
>   };
>   



More information about the Intel-xe mailing list