Skip to content

Commit e806fac

Browse files
committed
drm/xe: Add max_vfs module parameter
We want to have an option to limit the number of the VFs that the PF driver will be able to manage. With this limit set to zero we will also have a way to completely disable the PF functionality. Since we currently don't support SR-IOV on any platform, we start with this limit set to zero by default. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240404154431.583-2-michal.wajdeczko@intel.com
1 parent a918e77 commit e806fac

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/gpu/drm/xe/xe_module.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ module_param_named_unsafe(force_probe, xe_modparam.force_probe, charp, 0400);
4848
MODULE_PARM_DESC(force_probe,
4949
"Force probe options for specified devices. See CONFIG_DRM_XE_FORCE_PROBE for details.");
5050

51+
#ifdef CONFIG_PCI_IOV
52+
module_param_named(max_vfs, xe_modparam.max_vfs, uint, 0400);
53+
MODULE_PARM_DESC(max_vfs,
54+
"Limit number of Virtual Functions (VFs) that could be managed. "
55+
"(0 = no VFs [default]; N = allow up to N VFs)");
56+
#endif
57+
5158
struct init_funcs {
5259
int (*init)(void);
5360
void (*exit)(void);

drivers/gpu/drm/xe/xe_module.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ struct xe_modparam {
1818
char *huc_firmware_path;
1919
char *gsc_firmware_path;
2020
char *force_probe;
21+
#ifdef CONFIG_PCI_IOV
22+
unsigned int max_vfs;
23+
#endif
2124
};
2225

2326
extern struct xe_modparam xe_modparam;

0 commit comments

Comments
 (0)