Currently reset_required can be configured using a module parameter.
But it cannot be overridden at runtime through sysfs, as the parameter
is read-only.

Make it writeable for root, as this is useful if vfio-platform is
builtin, so the following works:

    echo 0 > /sys/module/vfio_platform/parameters/reset_required

Not-Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be>
---
TODO: Implement a vfio reset driver instead.
---
 drivers/vfio/platform/vfio_platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vfio/platform/vfio_platform.c 
b/drivers/vfio/platform/vfio_platform.c
index 6561751a1063ee29..ef89146deddcea80 100644
--- a/drivers/vfio/platform/vfio_platform.c
+++ b/drivers/vfio/platform/vfio_platform.c
@@ -24,7 +24,7 @@
 #define DRIVER_DESC     "VFIO for platform devices - User Level meta-driver"
 
 static bool reset_required = true;
-module_param(reset_required, bool, 0444);
+module_param(reset_required, bool, 0644);
 MODULE_PARM_DESC(reset_required, "override reset requirement (default: 1)");
 
 /* probing devices from the linux platform bus */
-- 
2.7.4

Reply via email to