Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933102AbdCUOev (ORCPT ); Tue, 21 Mar 2017 10:34:51 -0400 Received: from mail-eopbgr10058.outbound.protection.outlook.com ([40.107.1.58]:8352 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932405AbdCUOeu (ORCPT ); Tue, 21 Mar 2017 10:34:50 -0400 From: Eli Cohen To: Alex Williamson , Gavin Shan CC: Bodong Wang , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Saeed Mahameed Subject: RE: [PATCH] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV Thread-Topic: [PATCH] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV Thread-Index: AQHSoYzEu/0iY6hKuUmLEkOMZwGwv6GeWkkAgAAHn4CAAFotAIAADNeAgAAFRgCAADjQAIAAU1CAgAABXnA= Date: Tue, 21 Mar 2017 14:34:46 +0000 Message-ID: References: <1490022874-54718-1-git-send-email-bodong@mellanox.com> <20170320230706.GA12252@gwshan> <7bfcfdcd-e0a8-f1e9-f112-fa35fdb845d7@mellanox.com> <20170320225708.6868676a@t450s.home> <20170321054305.GA12230@gwshan> <20170321000158.444991a3@t450s.home> <20170321092518.GA19657@gwshan> <20170321082329.4f408a9e@t450s.home> In-Reply-To: <20170321082329.4f408a9e@t450s.home> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=mellanox.com; x-originating-ip: [207.140.101.5] x-ms-office365-filtering-correlation-id: ab5baa56-28d3-4e96-35cc-08d470676c34 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081);SRVR:AM5PR0502MB3059; x-microsoft-exchange-diagnostics: 1;AM5PR0502MB3059;7:jC4+wrIz0nMVjASW3bQu0CT/F/dCd7PeRhRFzCJZyCpp9SGSa/3zyosopOkt3QH93cg3C5sM1nXsOTp8f2VR8mCLtSCQthN0bzvInssn+WzJlo/rwb5nRPvO4DQrMe+tlcN3D/wwa5aSlLYKmlqi47Np/S6S/76k5dXyJgDW9M4pewLY+uLJMm1hkOMvt3Tr5UC/qBa7+rKu+V8eDvooWaz3kHFgVySIAuaitIT2tiBI74QMKZXuYWqkPaDDJaSrxxKcclbgcR9fw5/NtyoiMU8MoytP7nLqfvnet5tSDMXljnawe9MMgrva6fsYeYTANXBVypRGuD2TZ/jlXq8V8g== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123562025)(20161123558025)(20161123564025)(20161123555025)(6072148);SRVR:AM5PR0502MB3059;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0502MB3059; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(39850400002)(39410400002)(39860400002)(39450400003)(39840400002)(6506006)(6436002)(33656002)(305945005)(8676002)(77096006)(8936002)(81166006)(54356999)(189998001)(50986999)(3280700002)(122556002)(76176999)(7736002)(74316002)(86362001)(2900100001)(93886004)(3660700001)(107886003)(2950100002)(7696004)(5660300001)(2906002)(55016002)(54906002)(25786008)(53936002)(6246003)(99286003)(9686003)(4326008)(102836003)(3846002)(229853002)(6116002)(38730400002)(66066001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0502MB3059;H:VI1PR0501MB2798.eurprd05.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2017 14:34:46.2733 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0502MB3059 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 mail.home.local id v2LEYtGY009504 Content-Length: 1106 Lines: 9 > If we want to talk about the ABI, I would suggest drawing from existing ABIs. We already have > drivers_autoprobe as part of the standard sysfs ABI, so if we want a binary switch, then >sriov_drivers_autoprobe might be a logical choice. If you're concerned about this mythical overhead of > binding to one driver then another, then why not draw from the driver_override interface to allow the > user to specify the driver to bind to, perhaps sriov_driver_override. Then if the user wants to bind all > the devices to vfio-pci, they can do so easily. I still fail to see that probing some fixed number of the VFs > and leaving the rest unprobed has any practical value and I imagine bugs coming in because users are > confused why some of their VFs behave differently than others. Thanks, I agree with Alex - the interface should better be binary - either probe VFs or not. The rest can be done with binding/unbinding VFs as necessary. The main goal is to refrain from automatically initializing virtual functions at the hypervisor if they were initially instantiated to assign then to guests.