Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752527AbdHPTow (ORCPT ); Wed, 16 Aug 2017 15:44:52 -0400 Received: from mail-bl2nam02on0061.outbound.protection.outlook.com ([104.47.38.61]:12896 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752408AbdHPTou (ORCPT ); Wed, 16 Aug 2017 15:44:50 -0400 From: "Jorgen S. Hansen" To: Dexuan Cui CC: "davem@davemloft.net" , "netdev@vger.kernel.org" , "gregkh@linuxfoundation.org" , "devel@linuxdriverproject.org" , KY Srinivasan , "Haiyang Zhang" , Stephen Hemminger , George Zhang , Michal Kubecek , Asias He , Stefan Hajnoczi , "Vitaly Kuznetsov" , Cathy Avery , "jasowang@redhat.com" , Rolf Neugebauer , Dave Scott , "Marcelo Cerri" , "apw@canonical.com" , "olaf@aepfle.de" , "joe@perches.com" , "linux-kernel@vger.kernel.org" , Dan Carpenter 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: AdMWE2FRTyA4wSwRRmSHRnOjNGe3sAAtLqAA Date: Wed, 16 Aug 2017 19:44:47 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=jhansen@vmware.com; x-originating-ip: [80.197.119.203] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY1PR05MB2651;20:kZizL4l20aatIoNa1kWoTjHJ7tiZj5j3kblQJXDF/Yaj+KzHGTe8p4SF6Wl6kGtAs+jS6p+Z6OJcmaRRRHM0QtgMNw7EqPRHlfwiuuXymSZneFWJ/W62JvjlVHJGsyMZ9lHW9/ZOitmS64h/XNG9Ks/Sjyohkpa4ZfOWfeO/zWI= x-ms-office365-filtering-correlation-id: dea1e388-9a3f-4a67-0a40-08d4e4df40c2 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR05MB2651; x-ms-traffictypediagnostic: CY1PR05MB2651: 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)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123564025)(20161123558100)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR05MB2651;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR05MB2651; x-forefront-prvs: 0401647B7F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(189002)(199003)(24454002)(377454003)(6506006)(1511001)(83716003)(478600001)(53546010)(6436002)(8676002)(81156014)(36756003)(81166006)(97736004)(8936002)(66066001)(6116002)(6246003)(3846002)(2950100002)(68736007)(6486002)(229853002)(110136004)(86362001)(102836003)(6916009)(54356999)(54906002)(76176999)(50986999)(99286003)(2561002)(53936002)(2900100001)(4326008)(7736002)(77096006)(305945005)(189998001)(101416001)(5660300001)(6512007)(33656002)(8666007)(2906002)(82746002)(7416002)(2421001)(25786009)(105586002)(3280700002)(14454004)(106356001)(3660700001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR05MB2651;H:CY1PR05MB2217.namprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2017 19:44:47.8568 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2651 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 base64 to 8bit by nfs id v7GJiukK004350 Content-Length: 1223 Lines: 17 > On Aug 16, 2017, at 12:13 AM, Dexuan Cui wrote: > > > Without the patch, vmw_vsock_vmci_transport.ko and vmw_vmci.ko can > automatically load when an application creates an AF_VSOCK socket. > > This is the expected good behavior on VMware hypervisor, but as we > are going to add hv_sock.ko (i.e. Hyper-V transport for AF_VSOCK), we > should make sure vmw_vsock_vmci_transport.ko doesn't load on Hyper-V, > otherwise there is a -EBUSY conflict when both vmw_vsock_vmci_transport.ko > and hv_sock.ko try to call vsock_core_init() on Hyper-V. The VMCI driver (vmw_vmci.ko) is used both by the VMware guest support (VMware Tools primarily) and by our Workstation product. Always disabling the VMCI driver on Hyper-V means that user won’t be able to run Workstation nested in Linux VMs on Hyper-V. Since the VMCI driver itself isn’t the problem here, maybe we could move the check to vmw_vsock_vmci_transport.ko? Ideally, there should be some way for a user to have access to both protocols, but for now disabling the VMCI socket transport for Hyper-V (possibly with a module option to skip that check and always load it) but leaving the VMCI driver functional would be better, Thanks, Jorgen