drm/xe: Allow to assign GGTT region to the VF
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 15 Apr 2024 17:39:33 +0000 (19:39 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 16 Apr 2024 10:37:29 +0000 (12:37 +0200)
commit9e56d026c6be4ad124b47dc5ea000bbb888841e0
treed06fb5c17fffc13597682be09110c91efb6152b6
parentc7201728f9832b0822dcc4f2843ffb050059ee2b
drm/xe: Allow to assign GGTT region to the VF

VF's drivers can't modify GGTT PTEs except the range explicitly
assigned by the PF driver. To allow hardware enforcement of this
requirement, each GGTT PTE has a field with the VF number that
identifies which VF can modify that particular GGTT PTE entry.

Only PF driver can modify this field and PF driver shall do that
before VF drivers will be loaded. Add function to prepare PTEs.
Since it will be used only by the PF driver, make it available
only for CONFIG_PCI_IOV=y.

Bspec: 45015, 52395
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240415173937.1287-3-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/regs/xe_gtt_defs.h
drivers/gpu/drm/xe/xe_ggtt.c
drivers/gpu/drm/xe/xe_ggtt.h