Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753378AbdHQREG (ORCPT ); Thu, 17 Aug 2017 13:04:06 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:59502 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753355AbdHQREF (ORCPT ); Thu, 17 Aug 2017 13:04:05 -0400 Date: Thu, 17 Aug 2017 10:04:01 -0700 (PDT) Message-Id: <20170817.100401.864010589587308706.davem@davemloft.net> To: decui@microsoft.com Cc: jhansen@vmware.com, netdev@vger.kernel.org, gregkh@linuxfoundation.org, devel@linuxdriverproject.org, kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, georgezhang@vmware.com, mkubecek@suse.cz, asias@redhat.com, stefanha@redhat.com, vkuznets@redhat.com, cavery@redhat.com, jasowang@redhat.com, rolf.neugebauer@docker.com, dave.scott@docker.com, marcelo.cerri@canonical.com, apw@canonical.com, olaf@aepfle.de, joe@perches.com, linux-kernel@vger.kernel.org, dan.carpenter@oracle.com Subject: Re: [PATCH] vsock: only load vmci transport on VMware hypervisor by default From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 17 Aug 2017 10:04:04 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 778 Lines: 22 From: Dexuan Cui Date: Thu, 17 Aug 2017 08:00:29 +0000 > @@ -73,6 +74,10 @@ struct vmci_transport_recv_pkt_info { > struct vmci_transport_packet pkt; > }; > > +static bool skip_hypervisor_check; > +module_param(skip_hypervisor_check, bool, 0444); > +MODULE_PARM_DESC(hot_add, "If set, attempt to load on non-VMware platforms"); > + I would avoid module parameters at all costs. It is the worst possible interface for users of your software. You really need to fundamentally solve the problems related to making sure the proper modules for the VM actually present on the system get loaded when necessary rather than adding hacks like this. Unlike a proper solution, these hacks are ugly but have to stay around forever once you put them in place.