From patchwork Fri Feb 9 15:16:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10209439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FA0D60596 for ; Fri, 9 Feb 2018 15:17:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D85829604 for ; Fri, 9 Feb 2018 15:17:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4032029792; Fri, 9 Feb 2018 15:17:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06E7129609 for ; Fri, 9 Feb 2018 15:17:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752222AbeBIPRX (ORCPT ); Fri, 9 Feb 2018 10:17:23 -0500 Received: from michel.telenet-ops.be ([195.130.137.88]:42754 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752179AbeBIPRM (ORCPT ); Fri, 9 Feb 2018 10:17:12 -0500 Received: from ayla.of.borg ([84.194.111.163]) by michel.telenet-ops.be with bizsmtp id 8fH71x0213XaVaC06fH7ay; Fri, 09 Feb 2018 16:17:10 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1ekAQF-0003RO-Fa; Fri, 09 Feb 2018 16:17:07 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1ekAQF-0000jU-7u; Fri, 09 Feb 2018 16:17:07 +0100 From: Geert Uytterhoeven To: Baptiste Reynal , Alex Williamson Cc: Arnd Bergmann , Alexander Graf , Magnus Damm , Laurent Pinchart , Wolfram Sang , kvm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, qemu-devel@nongnu.org, Geert Uytterhoeven Subject: [PATCH/RFC 1/6] vfio: platform: Allow runtime override of reset_required Date: Fri, 9 Feb 2018 16:16:48 +0100 Message-Id: <1518189413-2761-2-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518189413-2761-1-git-send-email-geert+renesas@glider.be> References: <1518189413-2761-1-git-send-email-geert+renesas@glider.be> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 */