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: 10209597 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 EDDC960247 for ; Fri, 9 Feb 2018 17:43:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC9222970D for ; Fri, 9 Feb 2018 17:43:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D169A29798; Fri, 9 Feb 2018 17:43:35 +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=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7EB0C2970D for ; Fri, 9 Feb 2018 17:43:35 +0000 (UTC) Received: from localhost ([::1]:49494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekChy-0006Iq-Ja for patchwork-qemu-devel@patchwork.kernel.org; Fri, 09 Feb 2018 12:43:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ekBDa-0007M0-5U for qemu-devel@nongnu.org; Fri, 09 Feb 2018 11:08:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ekBDY-0001G6-Gt for qemu-devel@nongnu.org; Fri, 09 Feb 2018 11:08:06 -0500 Received: from leibniz.telenet-ops.be ([195.130.137.77]:55134) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ekBDY-0001Ez-1r for qemu-devel@nongnu.org; Fri, 09 Feb 2018 11:08:04 -0500 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 3zdJvz2vw1zMqc1B for ; Fri, 9 Feb 2018 16:32:15 +0100 (CET) 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 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.130.137.77 X-Mailman-Approved-At: Fri, 09 Feb 2018 12:38:16 -0500 Subject: [Qemu-devel] [PATCH/RFC 1/6] vfio: platform: Allow runtime override of reset_required X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , kvm@vger.kernel.org, Magnus Damm , Alexander Graf , qemu-devel@nongnu.org, linux-renesas-soc@vger.kernel.org, Wolfram Sang , Laurent Pinchart , Geert Uytterhoeven Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 */