From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: [PATCH 1/3] drm/xe: Add max_vfs module parameter
Date: Thu, 4 Apr 2024 17:44:29 +0200 [thread overview]
Message-ID: <20240404154431.583-2-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240404154431.583-1-michal.wajdeczko@intel.com>
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>
---
drivers/gpu/drm/xe/xe_module.c | 7 +++++++
drivers/gpu/drm/xe/xe_module.h | 3 +++
2 files changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_module.c b/drivers/gpu/drm/xe/xe_module.c
index 110b69864656..ceb8345cbca6 100644
--- a/drivers/gpu/drm/xe/xe_module.c
+++ b/drivers/gpu/drm/xe/xe_module.c
@@ -48,6 +48,13 @@ module_param_named_unsafe(force_probe, xe_modparam.force_probe, charp, 0400);
MODULE_PARM_DESC(force_probe,
"Force probe options for specified devices. See CONFIG_DRM_XE_FORCE_PROBE for details.");
+#ifdef CONFIG_PCI_IOV
+module_param_named(max_vfs, xe_modparam.max_vfs, uint, 0400);
+MODULE_PARM_DESC(max_vfs,
+ "Limit number of Virtual Functions (VFs) that could be managed. "
+ "(0 = no VFs [default]; N = allow up to N VFs)");
+#endif
+
struct init_funcs {
int (*init)(void);
void (*exit)(void);
diff --git a/drivers/gpu/drm/xe/xe_module.h b/drivers/gpu/drm/xe/xe_module.h
index 88ef0e8b2bfd..b369984f08ec 100644
--- a/drivers/gpu/drm/xe/xe_module.h
+++ b/drivers/gpu/drm/xe/xe_module.h
@@ -18,6 +18,9 @@ struct xe_modparam {
char *huc_firmware_path;
char *gsc_firmware_path;
char *force_probe;
+#ifdef CONFIG_PCI_IOV
+ unsigned int max_vfs;
+#endif
};
extern struct xe_modparam xe_modparam;
--
2.43.0
next prev parent reply other threads:[~2024-04-04 15:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 15:44 [PATCH 0/3] Add proper detection of the SR-IOV PF mode Michal Wajdeczko
2024-04-04 15:44 ` Michal Wajdeczko [this message]
2024-04-09 17:47 ` [PATCH 1/3] drm/xe: Add max_vfs module parameter Rodrigo Vivi
2024-04-04 15:44 ` [PATCH 2/3] drm/xe: Add proper detection of the SR-IOV PF mode Michal Wajdeczko
2024-04-09 17:47 ` Rodrigo Vivi
2024-04-09 18:39 ` Michal Wajdeczko
2024-04-09 18:42 ` Rodrigo Vivi
2024-04-04 15:44 ` [PATCH 3/3] drm/xe: Add SR-IOV info attribute to debugfs Michal Wajdeczko
2024-04-09 17:48 ` Rodrigo Vivi
2024-04-04 17:55 ` ✓ CI.Patch_applied: success for Add proper detection of the SR-IOV PF mode Patchwork
2024-04-04 17:55 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-04 17:56 ` ✓ CI.KUnit: success " Patchwork
2024-04-04 18:08 ` ✓ CI.Build: " Patchwork
2024-04-04 18:10 ` ✓ CI.Hooks: " Patchwork
2024-04-04 18:12 ` ✓ CI.checksparse: " Patchwork
2024-04-04 18:22 ` ✗ CI.BAT: failure " Patchwork
2024-04-04 20:57 ` ✓ CI.Patch_applied: success for Add proper detection of the SR-IOV PF mode (rev2) Patchwork
2024-04-04 20:57 ` ✗ CI.checkpatch: warning " Patchwork
2024-04-04 20:59 ` ✓ CI.KUnit: success " Patchwork
2024-04-04 21:10 ` ✓ CI.Build: " Patchwork
2024-04-04 21:13 ` ✓ CI.Hooks: " Patchwork
2024-04-04 21:14 ` ✓ CI.checksparse: " Patchwork
2024-04-04 21:34 ` ✓ CI.BAT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240404154431.583-2-michal.wajdeczko@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox