Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751636AbdHQIKe (ORCPT ); Thu, 17 Aug 2017 04:10:34 -0400 Received: from mail-hk2apc01on0116.outbound.protection.outlook.com ([104.47.124.116]:2849 "EHLO APC01-HK2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750741AbdHQIKa (ORCPT ); Thu, 17 Aug 2017 04:10:30 -0400 From: Dexuan Cui To: "'Jorgen S. Hansen'" , "'davem@davemloft.net'" CC: "'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: AdMWE2FRTyA4wSwRRmSHRnOjNGe3sAAtLqAAAAWomqAAE1yXgA== Date: Thu, 17 Aug 2017 08:10:05 +0000 Message-ID: References: In-Reply-To: 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-16T15:33:39.7136512-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: [50.35.78.155] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;KL1P15301MB0053;6:1xE5AU8eWSfXmvIRXN1cb6uK4Ml4rIODlG/6pnafGCPqvNSzlhqbAUdbxLvnSOD0tjjMgmisHtQD/+DrY5qylAjMZV2JrT6glIACX8ZtfyKR6IOkK/CPzJnjUildLjZ95ThFfEKLHV3D3UL6mQ7+t8TPsPQBgvk7GdP1mrXZeKXZI629fHw7wVTNQNl5PlGVlsMxxK1mtGywHz4bESQ765MX9jqQDgk8d28Mwjoz3bwqgk02DaKoOtPjol7MVsEDpjHpUTpaND8tgV0UBzLRTeQVQfSPCyd3qxV+CKb66tFbMuYv2gUPddirsBtDWWwhZMzIvNs+gl+AnTw62FA8Yg==;5:Is2+J3afwmZJkdN3YpOXo0/QD2JaC2W7vGyFIC3RANuIKPtEY9o75NyWQcf2YOdQ66e4PX8nDLhoaputNIRjMqLLIVNq9TMr6i5Kn9F9RGaNs3Sw2TE6FbFNeKWSqSCGImLk9ynbhqg+1GEz8yVPBg==;24:S3D50v/jXSTHauLsMhaEYwm0vbBU8HwKobJM8Bc7IwPLSzFNXwXePFmU4g507GZ9qsT5H/Eeqvtn+lvQt9BsBnrRZ8WAVrsNSie1K8K+/vQ=;7:tSXuo5O1dPEuK7TXdekF9aZT8p437Efzojcd4NVNxQVDe38bTdHDBtt3erzfbEa2+LI7sQR+VdcfSqZlnl4y4nhnZNjc+7NHuHzn9FjQLwI6EYHF2gfEVdHz69wBcG8lfZTKxbS0ILxjyjJZC2rS2qC3TNDsAYmUhg2i05nv3Vq3Lq9fqgaxCDL7Y6CzTfCCKWX1DjfFiRIubd66mtnWpWnXODpI8IUvNZpr+Gc+o6o= x-ms-office365-filtering-correlation-id: 14f01eca-08f2-4bd6-e57d-08d4e5475f0c x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:KL1P15301MB0053; x-ms-traffictypediagnostic: KL1P15301MB0053: x-exchange-antispam-report-test: UriScan:(61668805478150)(788757137089); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:KL1P15301MB0053;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:KL1P15301MB0053; x-forefront-prvs: 0402872DA1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(189002)(199003)(10090500001)(2900100001)(14454004)(54356999)(6506006)(101416001)(76176999)(33656002)(50986999)(7416002)(77096006)(6436002)(4326008)(53936002)(74316002)(25786009)(6246003)(54906002)(55016002)(9686003)(106356001)(105586002)(102836003)(3846002)(6116002)(305945005)(7736002)(86612001)(86362001)(345774005)(81166006)(68736007)(8936002)(81156014)(66066001)(2906002)(3280700002)(3660700001)(5005710100001)(8676002)(8990500004)(2950100002)(478600001)(7696004)(97736004)(189998001)(10290500003)(229853002)(5660300001)(491001);DIR:OUT;SFP:1102;SCL:1;SRVR:KL1P15301MB0053;H:KL1P15301MB0008.APCP153.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" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Aug 2017 08:10:05.8389 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1P15301MB0053 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 v7H8AdEe020319 Content-Length: 1839 Lines: 48 > From: Dexuan Cui > Sent: Wednesday, August 16, 2017 15:34 > > From: Jorgen S. Hansen [mailto:jhansen@vmware.com] > > > 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, > > > > Jorgen > > Thank you for explaining the background! > Then I'll make a new patch, following your suggestion. > > -- Dexuan Hi Jorgen, David, Just now I posted a new patch "[PATCH] vsock: only load vmci transport on VMware hypervisor by default" to replace this patch. @Jorgen: FWIW, with the new patch, when I create an AF_VSOCK sockets on Hyper-V, vmw_vmci.ko is also automatically loaded and 3 lines of kernel messages are printed, but I think I'm OK with this, since it's harmless. -- Dexuan