All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	Yishai Hadas <yishaih@nvidia.com>
Cc: "jgg@nvidia.com" <jgg@nvidia.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	"parav@nvidia.com" <parav@nvidia.com>,
	"feliu@nvidia.com" <feliu@nvidia.com>,
	"jiri@nvidia.com" <jiri@nvidia.com>,
	"joao.m.martins@oracle.com" <joao.m.martins@oracle.com>,
	"si-wei.liu@oracle.com" <si-wei.liu@oracle.com>,
	"leonro@nvidia.com" <leonro@nvidia.com>,
	"maorg@nvidia.com" <maorg@nvidia.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: RE: [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices
Date: Thu, 14 Dec 2023 05:52:15 +0000	[thread overview]
Message-ID: <BN9PR11MB52762A39B525CBEBB8E89B638C8CA@BN9PR11MB5276.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20231213132340.4f692bd0.alex.williamson@redhat.com>

> From: Alex Williamson <alex.williamson@redhat.com>
> Sent: Thursday, December 14, 2023 4:24 AM
> 
> On Wed, 13 Dec 2023 14:25:10 +0200
> Yishai Hadas <yishaih@nvidia.com> wrote:
> 
> > On 13/12/2023 10:23, Tian, Kevin wrote:
> 
> > >> +
> > >> +static int virtiovf_pci_probe(struct pci_dev *pdev,
> > >> +			      const struct pci_device_id *id)
> > >> +{
> > >> +	const struct vfio_device_ops *ops = &virtiovf_vfio_pci_ops;
> > >> +	struct virtiovf_pci_core_device *virtvdev;
> > >> +	int ret;
> > >> +
> > >> +	if (pdev->is_virtfn && virtio_pci_admin_has_legacy_io(pdev) &&
> > >> +	    !virtiovf_bar0_exists(pdev))
> > >> +		ops = &virtiovf_vfio_pci_tran_ops;
> > >
> > > I have a confusion here.
> > >
> > > why do we want to allow this driver binding to non-matching VF or
> > > even PF?
> >
> > The intention is to allow the binding of any virtio-net device (i.e. PF,
> > VF which is not transitional capable) to have a single driver over VFIO
> > for all virtio-net devices.
> >
> > This enables any user space application to bind and use any virtio-net
> > device without the need to care.
> >
> > In case the device is not transitional capable, it will simply use the
> > generic vfio functionality.
> 
> The algorithm we've suggested for finding the most appropriate variant
> driver for the device doesn't include a step of moving on to another
> driver if the binding fails.  We lose determinism at that point.
> Therefore this driver needs to handle all devices matching the id table.
> The fact that virtio dictates various config space fields limits our
> ability to refine the match from the id table. Thanks,
> 

OK, that makes sense.

  reply	other threads:[~2023-12-14  5:52 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-07 10:28 [PATCH V7 vfio 0/9] Introduce a vfio driver over virtio devices Yishai Hadas
2023-12-07 10:28 ` [PATCH V7 vfio 1/9] virtio: Define feature bit for administration virtqueue Yishai Hadas
2023-12-07 10:28 ` [PATCH V7 vfio 2/9] virtio-pci: Introduce admin virtqueue Yishai Hadas
2023-12-07 10:28 ` [PATCH V7 vfio 3/9] virtio-pci: Introduce admin command sending function Yishai Hadas
2023-12-07 10:28 ` [PATCH V7 vfio 4/9] virtio-pci: Introduce admin commands Yishai Hadas
2023-12-07 10:28 ` [PATCH V7 vfio 5/9] virtio-pci: Initialize the supported " Yishai Hadas
2023-12-07 10:28 ` [PATCH V7 vfio 6/9] virtio-pci: Introduce APIs to execute legacy IO " Yishai Hadas
2023-12-07 10:28 ` [PATCH V7 vfio 7/9] vfio/pci: Expose vfio_pci_core_setup_barmap() Yishai Hadas
2023-12-13  8:24   ` Tian, Kevin
2023-12-07 10:28 ` [PATCH V7 vfio 8/9] vfio/pci: Expose vfio_pci_core_iowrite/read##size() Yishai Hadas
2023-12-13  8:24   ` Tian, Kevin
2023-12-07 10:28 ` [PATCH V7 vfio 9/9] vfio/virtio: Introduce a vfio driver over virtio devices Yishai Hadas
2023-12-13  8:23   ` Tian, Kevin
2023-12-13 12:25     ` Yishai Hadas
2023-12-13 20:23       ` Alex Williamson
2023-12-14  5:52         ` Tian, Kevin [this message]
2023-12-14  6:07       ` Tian, Kevin
2023-12-14  8:57         ` Yishai Hadas
2023-12-15  0:32           ` Tian, Kevin
2023-12-14  6:38   ` Michael S. Tsirkin
2023-12-14  9:03     ` Yishai Hadas
2023-12-14  9:19       ` Michael S. Tsirkin
2023-12-14  9:37         ` Yishai Hadas
2023-12-14 14:59           ` Alex Williamson
2023-12-14 15:05             ` Michael S. Tsirkin
2023-12-14 16:03               ` Yishai Hadas
2023-12-14 16:15                 ` Alex Williamson
2023-12-14 16:25                   ` Yishai Hadas
2023-12-14 16:40                     ` Michael S. Tsirkin
2023-12-17 10:39                       ` Yishai Hadas
2023-12-17 12:20                         ` Michael S. Tsirkin
2023-12-17 13:20                           ` Yishai Hadas
2023-12-17 13:42                             ` Michael S. Tsirkin
2023-12-17 14:18                               ` Yishai Hadas
2023-12-11  8:28 ` [PATCH V7 vfio 0/9] " Yishai Hadas
2023-12-11 16:55   ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN9PR11MB52762A39B525CBEBB8E89B638C8CA@BN9PR11MB5276.namprd11.prod.outlook.com \
    --to=kevin.tian@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=feliu@nvidia.com \
    --cc=jasowang@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=leonro@nvidia.com \
    --cc=maorg@nvidia.com \
    --cc=mst@redhat.com \
    --cc=parav@nvidia.com \
    --cc=si-wei.liu@oracle.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=yishaih@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.