drm/xe/pf: Add support to configure SR-IOV VFs
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 15 Apr 2024 17:39:37 +0000 (19:39 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 16 Apr 2024 10:37:36 +0000 (12:37 +0200)
commitac6598aed1b36d0301fa43732ad40d440dc86620
tree018b01e10be4b4892d51a1e0c4dd8ff186997b8d
parent1f2880bab254918dd596153de77fcbee6947c6bc
drm/xe/pf: Add support to configure SR-IOV VFs

To run correctly, each Virtual Function must be provisioned with
some chunk of shared hardware or firmware resources (like GGTT,
device memory, GuC doorbell IDs, GuC context IDs) and scheduling
parameters (execution quantum or preemption timeout).

All resources assigned to VFs must be excluded from the PF driver
use and may require some additional preparation steps (like setup
of the LMTT or update of the GGTT PTE). Those provisioning details
must be then sent to the GuC firmware as most of those details
will be shared later with the VF drivers during their boot.

Add basic functions to provision VFs with all hardware resources
or scheduling parameters. We will use them shortly in upcoming
patches either in manual provisioning over debugfs, exposed to the
advanced users, or automatic provisioning done by PF driver during
VFs enabling.

Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240415173937.1287-7-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c [new file with mode: 0644]
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.h [new file with mode: 0644]
drivers/gpu/drm/xe/xe_gt_sriov_pf_config_types.h [new file with mode: 0644]
drivers/gpu/drm/xe/xe_gt_sriov_pf_types.h