From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 038BCC433B4 for ; Wed, 28 Apr 2021 12:41:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C51756141E for ; Wed, 28 Apr 2021 12:41:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237798AbhD1Mmk (ORCPT ); Wed, 28 Apr 2021 08:42:40 -0400 Received: from verein.lst.de ([213.95.11.211]:49100 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230431AbhD1Mmk (ORCPT ); Wed, 28 Apr 2021 08:42:40 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id A655C68BEB; Wed, 28 Apr 2021 14:41:53 +0200 (CEST) Date: Wed, 28 Apr 2021 14:41:53 +0200 From: Christoph Hellwig To: Dan Williams Cc: Christoph Hellwig , Jason Gunthorpe , Alex Williamson , Cornelia Huck , kvm@vger.kernel.org, Kirti Wankhede , "Raj, Ashok" , Daniel Vetter , Leon Romanovsky , Max Gurtovoy , Tarun Gupta Subject: Re: [PATCH v2 02/13] vfio/mdev: Allow the mdev_parent_ops to specify the device driver to bind Message-ID: <20210428124153.GA28566@lst.de> References: <0-v2-7667f42c9bad+935-vfio3_jgg@nvidia.com> <2-v2-7667f42c9bad+935-vfio3_jgg@nvidia.com> <20210428060300.GA4092@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Apr 28, 2021 at 12:56:21AM -0700, Dan Williams wrote: > > I still think this going the wrong way. Why can't we enhance the core > > driver code with a version of device_bind_driver() that does call into > > ->probe? That probably seems like a better model for those existing > > direct users of device_bind_driver or device_attach with a pre-set > > ->drv anyway. > > Wouldn't that just be "export device_driver_attach()" so that drivers > can implement their own custom bind implementation? That looks like it might be all that is needed.