Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752426AbdHPSwR (ORCPT ); Wed, 16 Aug 2017 14:52:17 -0400 Received: from mail-pu1apc01on0105.outbound.protection.outlook.com ([104.47.126.105]:2896 "EHLO APC01-PU1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751635AbdHPSwP (ORCPT ); Wed, 16 Aug 2017 14:52:15 -0400 From: Dexuan Cui To: David Miller CC: "netdev@vger.kernel.org" , "gregkh@linuxfoundation.org" , "devel@linuxdriverproject.org" , KY Srinivasan , Haiyang Zhang , "Stephen Hemminger" , "georgezhang@vmware.com" , "jhansen@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 net-next 1/3] VMCI: only load on VMware hypervisor Thread-Topic: [PATCH net-next 1/3] VMCI: only load on VMware hypervisor Thread-Index: AdMWE2FRTyA4wSwRRmSHRnOjNGe3sAApwRmAAACVWeA= Date: Wed, 16 Aug 2017 18:51:36 +0000 Message-ID: References: <20170816.110635.1062040564700704290.davem@davemloft.net> In-Reply-To: <20170816.110635.1062040564700704290.davem@davemloft.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=decui@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-08-16T11:51:34.3742614-07:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-originating-ip: [167.220.0.83] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;KL1P15301MB0072;6:XJQi8GMT1yATC8JNfTAkvW1VLoVhH4pT7twv4yDobqhtAyHKBSRYqXbza9EwpxzifB5tBhoq8Wac6Ltt3tO2pzFIGkoTrwtspjqK157vGV1CY3kH9ySx1u1LSlSfeNqZlA0tlqRgTUgTIoP92KRH+5tEeO/7ZB+we/Xcdpx45yWYYq20pr4CQs8toXfFSxieTxoaKd5GcqfrJ4FdV73FyL0mwRsvHMZkO/SapgnUqBES71FR+mBw+QbadWEgScJXKEe1A0Bspmks66nz7xuq5gIBKw7MtanJIUlE4zFfVeZdrTlZHmkQ025jPMViDZKcFP46zs8cQGjqBcupBsSnig==;5:ljrVYe6iU7yW05rqnaSkMxJAULvMCQ27eRWzSVJluutr/yEpiIRuvqePkYru5w44sE5wAhH9YzaPBM5RhuAbyQCJIT7DPpNrobzbhA9IDVPQWOnBzcIgBNe0pIP4PeX+w41GzN/+puMoj66cxFwyIQ==;24:emyIvpIXoPKh1NPh7L3GacdScNIkF7+cBp7lQOqUa9zkSV22Kw9w3nRQ8jcVcSFBaVtlfPXA8MqiMEruOVXrvYTFw9FkDvHtBHA5Uy3skpg=;7:WXQxHPszBDwAIwphEeq/tCHdHZERgOjAuTALQ3egw9g+Dum5q6nJ8QKQqya4QP4yOe0dPGaGIXWayWE/V0YYtFBfX28rulK9wTlQbfzvZk8PIAFywuDpiyaZxTKwUWW1H+bL08U5GgvASWNJcPBvw7nCrP0VR/gTjHH9PhLih8tZI1XtV8JK1HHSccglwVcvyTlaITkV19fZPY4ni3gB6e3TV49cGqRZBokdL5z4LCY= x-ms-office365-filtering-correlation-id: 428241c1-3661-4acf-e5a6-08d4e4d7d2f5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:KL1P15301MB0072; x-ms-traffictypediagnostic: KL1P15301MB0072: x-exchange-antispam-report-test: UriScan:(89211679590171); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041248)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:KL1P15301MB0072;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:KL1P15301MB0072; x-forefront-prvs: 0401647B7F x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(199003)(189002)(478600001)(105586002)(4326008)(86362001)(6116002)(102836003)(6246003)(3846002)(10290500003)(50986999)(101416001)(97736004)(76176999)(2900100001)(54356999)(229853002)(189998001)(6506006)(14454004)(305945005)(86612001)(33656002)(2950100002)(6436002)(25786009)(77096006)(8676002)(7736002)(7416002)(74316002)(54906002)(3280700002)(2906002)(7696004)(68736007)(81156014)(5660300001)(8936002)(53936002)(6916009)(3660700001)(81166006)(55016002)(66066001)(9686003)(106356001)(8990500004)(5005710100001)(10090500001)(110136004);DIR:OUT;SFP:1102;SCL:1;SRVR:KL1P15301MB0072;H:KL1P15301MB0008.APCP153.PROD.OUTLOOK.COM;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2017 18:51:36.7170 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1P15301MB0072 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7GIqNXC004054 Content-Length: 1415 Lines: 41 > From: David Miller [mailto:davem@davemloft.net] > Sent: Wednesday, August 16, 2017 11:07 > > From: Dexuan Cui > Date: Tue, 15 Aug 2017 22:13:29 +0000 > > > + /* > > + * Check if we are running on VMware's hypervisor and bail out > > + * if we are not. > > + */ > > + if (x86_hyper != &x86_hyper_vmware) > > + return -ENODEV; > > This symbol is only available when CONFIG_HYPERVISOR_GUEST is defined. > But this driver does not have a Kconfig dependency on that symbol so > the build can fail in some configurations. Hi David, It looks typically modern Linux distros have CONFIG_HYPERVISOR_GUEST=y by default, but I agree here we should make the dependency explicit: --- a/drivers/misc/vmw_vmci/Kconfig +++ b/drivers/misc/vmw_vmci/Kconfig @@ -4,7 +4,7 @@ config VMWARE_VMCI tristate "VMware VMCI Driver" - depends on X86 && PCI + depends on X86 && PCI && HYPERVISOR_GUEST help This is VMware's Virtual Machine Communication Interface. It enables high-speed communication between host and guest in a virtual And it looks it's not a bad thing to add the dependency, because some existing VMWare drivers have had the dependency on CONFIG_HYPERVISOR_GUEST=y: drivers/input/mouse/vmmouse.c (MOUSE_PS2_VMMOUSE) drivers/misc/vmw_balloon.c (VMWARE_BALLOON) Do you want me to submit a v2 for this patch with the Kconfig change? -- Dexuan