Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753969AbdDNPoe (ORCPT ); Fri, 14 Apr 2017 11:44:34 -0400 Received: from mail-ve1eur01on0045.outbound.protection.outlook.com ([104.47.1.45]:42900 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751720AbdDNPob (ORCPT ); Fri, 14 Apr 2017 11:44:31 -0400 Authentication-Results: mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=none action=none header.from=mellanox.com; Subject: Re: [v3] PCI: Add an option to control probing of VFs before enabling SR-IOV To: Bjorn Helgaas References: <1492037500-84654-1-git-send-email-bodong@mellanox.com> <20170414153718.GD29349@bhelgaas-glaptop.roam.corp.google.com> CC: , , , Eli Cohen From: Bodong Wang Message-ID: Date: Fri, 14 Apr 2017 10:44:12 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170414153718.GD29349@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [172.87.190.14] X-ClientProxiedBy: CY4PR04CA0031.namprd04.prod.outlook.com (10.172.133.17) To AM5PR0502MB3058.eurprd05.prod.outlook.com (10.175.39.8) X-MS-Office365-Filtering-Correlation-Id: bd5a6ac8-33b2-4f6b-c74c-08d4834d22d3 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081)(201703131423075)(201703031133081);SRVR:AM5PR0502MB3058; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0502MB3058;3:EYEu5gHAv/WRZHk00H2NdzlBdBBFBJ+Gr4v6Vl45h8wz1uVOQ7UPOWWifYOulsZhlNVn6nIMKFiYF7LEFQ22EZL1wtY20NkKcpc5kqSqNB/eL1kxj2MUv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PpckoCd04e/ZD5Eq7Zx4S/j9W1nE+8vgOAQAh4YQn2YKmPOWctLWDa99aGcE8QxP3PD9q4EBf/WauPKLlP8PsBA4KAfi4yqOB0Hpvk6ZBxo4/SZOGP5qRYnnBH4k7hJ2Konsp87j0QhxktWzDUUWh4uVVd+vLR1fIj2jngpWYjq/WDNpb6cZvMA/cN7PXD/G448StttAksZYj5DOv7lMTdtpkKFuPfVwTfdX7esFAyjaTZiTPuCPJBptF/nr9MmfMQrPyC+rHVN+0mWs2NpTNfYGl1zqixpKu05qVifmqZGO6lPCtMdAx6nFcaxElLp/+Y/YftTRFoV4r6VoaJppHZz6EKg+IeJWgD3QqdgUzKo3KRzjiWtZACn3C5Wnn6N38ZNw+lI9LvYSNc3VREcnoFaTcRiSI2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(104084551191319); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148);SRVR:AM5PR0502MB3058;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0502MB3058; X-Microsoft-Exchange-Diagnostics: 1;AM5PR0502MB3058;4:ACniM7XwGCmuy5O/c2VvVOnBI0RtUtjoTlA+4Sn50rT33XNQrsEd9kk4Pkct1RrsOtB6Z1QdnWjPoWxcIRXq/dWqv3CrjhdPyclmpD1aMFlmFlvOcsnmLUUDv7dFqff60x5DFOM4R6DqVFDNfl5Fo811New9bVcZeSN/i/xzVe6NnjkZik6+zCQomyJVs8KtOmA1rtWGvK17FuL6Nh0Ko5SsA4gewOolAkX17tiEZVN+OH2qZg0VwzLpogSqc+sxhWDNOjcgcINKGuOYEPUIT2zdbopL808PPCmqzMAB47F+kLBkDKs9U2nNxx144/RpsTva4B5QJI08ZwwSix4EylgE1GD96zFr/M5oWh3ZxJbdHM1n69jbNvyLakCitagNnPm0Vgz5y0HuwBKpxlQO5/06/N1bFqufxl8zHTlR/N9+0m5ZyM97itnMC3m/WImBAEkBNBiF33nDkdo5MN9O0cVCMO7TnXmXeyvgce5eKAofkxpYh6uAODL6e+oJNClkSCaliHju/K5deU02SJDGEhRCT/Kybv+6j1LV1UgUaFEEh/QFByLKf0vz8Jrz9ZlgBMkD0arCJM99tYmB2jBepcmHKTPboCs1atMj4NLeTMgjKbxxjQdF6hHhr5SpKuHCEyEpcSjbldiIQzmG8ZvhRw/PrWiYjcG7rR2cV2hbGY+Rxbn8dm0U5QwMk1uRJsQpp3sAne+RoDMHHpoNBP+InwZOfRu8I9Uoh4eei00UAN0w80U4gNvSkTHbtiMZKhKwi/9IUtW0zoa2qcbbwGbW7w== X-Forefront-PRVS: 02778BF158 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(39410400002)(39840400002)(39450400003)(39860400002)(39400400002)(39850400002)(24454002)(377454003)(36756003)(230700001)(65826007)(4326008)(6246003)(6666003)(54356999)(305945005)(47776003)(50986999)(90366009)(2950100002)(6916009)(8676002)(53546009)(25786009)(66066001)(81166006)(5660300001)(76176999)(31686004)(7736002)(54906002)(189998001)(4001350100001)(42186005)(2906002)(6116002)(83506001)(23746002)(229853002)(6486002)(86362001)(53936002)(33646002)(107886003)(31696002)(38730400002)(77096006)(50466002)(3846002)(110136004);DIR:OUT;SFP:1101;SCL:1;SRVR:AM5PR0502MB3058;H:[10.12.146.132];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;AM5PR0502MB3058;23:5v9fMFclFhLKxeQX9+TL6UrlxIxyMtEy16w?= =?Windows-1252?Q?NI4s+W2wRDLf6W4J3D+mwLWKMnD7aijag35hUTBN9XORKUhdsaqUvVXW?= =?Windows-1252?Q?Mioi9wy7hxKqFG/6On5d6t2t4HdWKev94WTaUeTswQ6taixgl5G63dAJ?= =?Windows-1252?Q?5DUjYkmE2VSDWUAQWfMubcsGMu5Jw+RTbJHtX/1ssnpSAPQo/7yqTYlC?= =?Windows-1252?Q?fFdyt1krNhutnZDAsOGHZSl0ugIFUI0tKaqNafjABtRNVHO/IpSn3mIw?= =?Windows-1252?Q?ZViwMI5fip1SBms4GbuKgtzdjOHnsA6kwLp29bSQug1oFmXgwllVPyNd?= =?Windows-1252?Q?YZAhH8vTTXd+WgIWYHNouPn98khtjdyUnw3jLxZso3Zhr4V1/H5PowNu?= =?Windows-1252?Q?cb0ZKNtETdY5zuX8xfbVDvoZNglIOP0PuCRVazE1kBMDw9Oaml7VBT92?= =?Windows-1252?Q?d2yeuqXK4WkZsPqAaBbWHAt/Oa2OHYkTe7dgJFwtX8OR7Zsugkiihx0J?= =?Windows-1252?Q?k9qbJSfg6sR8Q4rh2CoI1SP6b/mStWXJ1+UPn7CdjnE6dssT68vQUvgT?= =?Windows-1252?Q?O6VFdePLlin4fiXreS0wMAfzl1wSliePtYSabxBnlSOMHeu1g4bZIzDz?= =?Windows-1252?Q?h+4ddkAC9+vZLZ+NkwWrXWqI0xh1m6ZjMpXDIVTkmC+PVrwsHe4xBlYy?= =?Windows-1252?Q?7IQcvkCHz688QLseipBHWCqFLUrYQoRDh2q8zdH/tzj8NwiqtF7msHc6?= =?Windows-1252?Q?m/Q3bKtYSqabZ45CSOEET0jU+VFKbaC8XXL61iinT5v2OnQcDnsly5i2?= =?Windows-1252?Q?0ZIFVoBpTAYHLzRXalQQS4UlS3ZPyQlzx6V6eTcKggl1lTv8w9l3L+hC?= =?Windows-1252?Q?rz3mmJhyyMYsnAYdVpYLY2PkfUI6L8E2SlnU0NNKLz+CQpTosBcomVMl?= =?Windows-1252?Q?v2ehiYg7qXy9E7c7VYzC2uAH9MDAw3dTDdvzZhx3ZnRJ/MHtWDZXYZCv?= =?Windows-1252?Q?0bH/wHwwAVQMRAK5kt96Hmj8Zz6/Na4RT3W5MboCou6J8kF+JhDMOuvo?= =?Windows-1252?Q?WePPHTZWaXnRJvvEDoiO6HnfoHw09EM/y+qroavW5GbQ/Wcd/B84l46C?= =?Windows-1252?Q?62NDuSjUy3b1pGKn++fKES4lytFFgRdw+ub37+rGYkYeJImomIu3K920?= =?Windows-1252?Q?Z7fY9KPKAhvC9Y9txQrxIf4COZWYYO8KSGq2fG2D0h+YXVTxcKYVYUPB?= =?Windows-1252?Q?SaxDpOPTDwPqkTMrO0IcmNb4KpcNnvNXR/C4IblhhzwZaivlut8e7fEj?= =?Windows-1252?Q?husM4vcxIGEqltWPyBOLjUUqoQAzRoeL+Rts9eDaZcJep0z64LfpYn9u?= =?Windows-1252?Q?PszDhVJ0GxlSwMyfXIKLHWeok+RiN9FZogep4f2wXqX7X22bbwjZ6l2I?= =?Windows-1252?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1;AM5PR0502MB3058;6:hE8ZR1yuvKot2M+R790vyKFE4fIl/XeyBN524XoOxDluQiM9h+Y56VNAAfYTr+5fiw4s6LhYmifMUX9MMj5Yb5/efDbfY+rLwz2b8HHnzzzj5AqRnuNTZJ+ioc82qBw2+OpSnsFjpfJ56fvOmqRS0p+GQkuxqf/Jy37BSC+I++qhbsATknoAQd6TjBJBrcX0u78FsrvCbtZqY1wW94JjxyvFPO8Kv/9N/is0VW/bKvLGKSNHqsDzIKlotCUbc9uaiqOSCqmf6m8GSFLF53hPw4YuuRFXHQYM018RG/2Ssfb2c6zKcvmzoE1G4uhe732/5Srkr2tYMc0dNO1ygvyMBwyD3kLEw5y6hDvrqcCeeDrBKe1uC3AK3SvwcHQulSW7kbBGfvTIRviMdNCHtLlmunxG37ROGDQBj7JTPwcYSHzcLWb2+XUeNF7limvOPy71cmRvvseyVOQe1J2CJqmV6UPmwPvn9z2POTQQng2NBTQ=;5:fwRl1CqW9iqPEkMw9e9JQ/e3UhvDPk7kejAv9SP1+GlwUlWvsG23mQKCMNFKjpluIQM74dQV1Ss8mjO9Dnvyxo7rEJThyHF0/9peglMiCHDtkDnkihSJh6JSjH0ZAxqj4RVuaHf4SgduTCitnTx5IA==;24:o5KXoylsBiTrLJQsRnrwO1CyzR1yzjas37/9+5j3g1wiFKBLOq4nlA2qrE/5g2djk6IHfTFx9VoOzneRqvw2SDJA0RoTVnetvmidHu0DyXE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;AM5PR0502MB3058;7:5Nw7y1zUklAkKIhNUOkbviDyadv8qRV//a3HjsnSeRqvPHxSRKmPK2BScOmaiikB2a9+FPrSHrCVfgmh8bFd8ITolrJXLNq1GxTgdAboofav5cDrzugD+3X2Tij9O0VWlNfuDAReKR29TFizcsrfIhT9zo24RHXWI59mS+IoPtgjpLWRVmPeoW0OGVCUmrTvP4G8aU0SaJ1t4yKAitNoOqe1mYWxgEwbfcmMOALAxVvCPsuwAC6cbTXwF4fzhEZagsMl0RSQA52YAPGnJsb6miHvgtzTVlSkr3Ov/jrJSyWO98QId4/d+SXnvl2UifloIzriJR9ZSeu9ADjW7TjCHA== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2017 15:44:27.3526 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0502MB3058 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1246 Lines: 27 On 4/14/2017 10:37 AM, Bjorn Helgaas wrote: > On Thu, Apr 13, 2017 at 01:51:40AM +0300, bodong@mellanox.com wrote: >> From: Bodong Wang >> >> Sometimes it is not desirable to probe the virtual functions after >> SRIOV is enabled. This can save host side resource usage by VF >> instances which would be eventually probed to VMs. >> >> Add a new PCI sysfs interface "sriov_drivers_autoprobe" to control >> that from the PF, all current callers still retain the same >> functionality. To modify it, echo 0/n/N (disable probe) or 1/y/Y >> (enable probe) to: >> >> /sys/bus/pci/devices//sriov_drivers_autoprobe >> >> Note that, the choice must be made before enabling VFs. The change >> will not take effect if VFs are already enabled. Simply, one can set >> sriov_numvfs to 0, choose whether to probe or not, and then resume >> sriov_numvfs. >> >> Signed-off-by: Bodong Wang >> Signed-off-by: Eli Cohen >> Reviewed-by: Gavin Shan >> Reviewed-by: Alex Williamson >> Reviewed-by: Bjorn Helgaas > Applied to pci/virtualization for v4.12, thanks, Bodong! Thank you! Bjorn/Alex/Gavin.