Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp254732ybg; Mon, 8 Jun 2020 23:00:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGQ0w49luJ75u/UEfk7LtzY2FtA1n6Z/dITMgvWDc/Q+dxzyKt8jTF6BZ3H4HT3IEp8APC X-Received: by 2002:aa7:da42:: with SMTP id w2mr24793095eds.176.1591682404610; Mon, 08 Jun 2020 23:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591682404; cv=none; d=google.com; s=arc-20160816; b=NOBxFBpMJ2oIv5KTo7MhAp4YuWeIP/j1CNL2MePlSC6SHDBvbMmQWU332rIm9FaXXT rGlhK/F0sTRZB7ypBr6me0M96FUagTIQqhkURQyHZn7C5y05jzHVp5+6b6jkGCNNW7AV KnPg9eLAJ1H4s3tiMriou6S8K4DW3m3t5J9waGinTa3WVQPjCe3LCZGEv7eZzqRTG/iU FRD3b5D19Zqw4m+PhewfFdnWSu/6ny733nG2z6EbSdSP4dQPdY1lSVfjlYU0FaRTUXh5 TNpSB/Wt3MC2RqNMYJqWSCI/0g97DOSje0M1L9eSXegjG721gyfBz1He8zjwH48Er8kM 5ubg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=08pzgeVHE6/leOw9rkcb4hjTCcujAlE6G/nlp9Vnewk=; b=yAQOYuNAidlzUclLOQG6v6qdhz0ygUUf7jv5b+5QmpZY7rQVScysFWgO4nkQE5SwZR fyGNxgmZRAcDRuCEHeRqTpZFPcYqzGmsz1hhzNzjXCyLU949uKJE8DcBDg8GE72BPeGd 3Zy9DNvGkL1wHGrQvcY7ta20C+7eNeYulct+Gd5vAPNshbU8OwDUKHPTRYxw8wSblRbs ocihNCscdCTlapqNE3j09eyEgN/invhBDDfzyoEKh36ukoI8CxeWzzF451W7FSUzQbaU yef51zuMwcXJYsnqt71WgdPEAHFLcB7nt59cepu2k2azYhJzqE1spa7vBQo76kUWCfdD dnWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TkRHdTU0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du1si14566955ejc.616.2020.06.08.22.59.41; Mon, 08 Jun 2020 23:00:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TkRHdTU0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727818AbgFIFzf (ORCPT + 99 others); Tue, 9 Jun 2020 01:55:35 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:46179 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726120AbgFIFzf (ORCPT ); Tue, 9 Jun 2020 01:55:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591682134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=08pzgeVHE6/leOw9rkcb4hjTCcujAlE6G/nlp9Vnewk=; b=TkRHdTU0rstOJqLz9heRxL0PpeZOLSnK5yYVME6HBEmnGQ3yhp0iKesKDayY/k+ctGVjDL hUyHxncRVA1JBoFbKfn/w/0TqV5IBHxldh1LD+2xo6NjoVNjLHbSTezefSYrti9K098Pk4 whFF/Jkvv3lvEqvvGnnYFPKdwydjRSc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-419-UVqavzv0Or2l_IiTMItEdA-1; Tue, 09 Jun 2020 01:55:32 -0400 X-MC-Unique: UVqavzv0Or2l_IiTMItEdA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 40FB81009440; Tue, 9 Jun 2020 05:55:30 +0000 (UTC) Received: from [10.72.12.252] (ovpn-12-252.pek2.redhat.com [10.72.12.252]) by smtp.corp.redhat.com (Postfix) with ESMTP id B55F160BF3; Tue, 9 Jun 2020 05:55:18 +0000 (UTC) Subject: Re: [PATCH 5/6] vdpa: introduce virtio pci driver To: "Michael S. Tsirkin" Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, rob.miller@broadcom.com, lingshan.zhu@intel.com, eperezma@redhat.com, lulu@redhat.com, shahafs@mellanox.com, hanand@xilinx.com, mhabets@solarflare.com, gdawar@xilinx.com, saugatm@xilinx.com, vmireyno@marvell.com, zhangweining@ruijie.com.cn, eli@mellanox.com References: <20200607095012-mutt-send-email-mst@kernel.org> <9b1abd2b-232c-aa0f-d8bb-03e65fd47de2@redhat.com> <20200608021438-mutt-send-email-mst@kernel.org> <20200608052041-mutt-send-email-mst@kernel.org> <9d2571b6-0b95-53b3-6989-b4d801eeb623@redhat.com> <20200608054453-mutt-send-email-mst@kernel.org> <20200608055331-mutt-send-email-mst@kernel.org> <61117e6a-2568-d0f4-8713-d831af32814d@redhat.com> <20200608092530-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: Date: Tue, 9 Jun 2020 13:55:14 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200608092530-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/6/8 下午9:29, Michael S. Tsirkin wrote: > On Mon, Jun 08, 2020 at 06:07:36PM +0800, Jason Wang wrote: >> On 2020/6/8 下午5:54, Michael S. Tsirkin wrote: >>> On Mon, Jun 08, 2020 at 05:46:52PM +0800, Jason Wang wrote: >>>> On 2020/6/8 下午5:45, Michael S. Tsirkin wrote: >>>>> On Mon, Jun 08, 2020 at 05:43:58PM +0800, Jason Wang wrote: >>>>>>>> Looking at >>>>>>>> pci_match_one_device() it checks both subvendor and subdevice there. >>>>>>>> >>>>>>>> Thanks >>>>>>> But IIUC there is no guarantee that driver with a specific subvendor >>>>>>> matches in presence of a generic one. >>>>>>> So either IFC or virtio pci can win, whichever binds first. >>>>>> I'm not sure I get there. But I try manually bind IFCVF to qemu's >>>>>> virtio-net-pci, and it fails. >>>>>> >>>>>> Thanks >>>>> Right but the reverse can happen: virtio-net can bind to IFCVF first. >>>> That's kind of expected. The PF is expected to be bound to virtio-pci to >>>> create VF via sysfs. >>>> >>>> Thanks >>>> >>>> >>>> >>> Once VFs are created, don't we want IFCVF to bind rather than >>> virtio-pci? >> >> Yes, but for PF we need virtio-pci. >> >> Thanks >> > (Ab)using the driver_data field for this is an option. > What do you think? Maybe you can elaborate more on this idea? Thanks >