[dpdk-dev] [PATCH v4 08/14] virtio: pci: extend virtio pci rw api for vfio interface

Yuanhan Liu yuanhan.liu at linux.intel.com
Mon Jan 18 07:11:25 CET 2016


On Fri, Jan 15, 2016 at 07:12:04PM +0530, Santosh Shukla wrote:
> On Fri, Jan 15, 2016 at 6:13 PM, Santosh Shukla <sshukla at mvista.com> wrote:
> > On Fri, Jan 15, 2016 at 11:57 AM, Yuanhan Liu
> > <yuanhan.liu at linux.intel.com> wrote:
> >> On Thu, Jan 14, 2016 at 06:58:31PM +0530, Santosh Shukla wrote:
> >>> So far virtio handle rw access for uio / ioport interface, This patch to extend
> >>> the support for vfio interface. For that introducing private struct
> >>> virtio_vfio_dev{
> >>>       - is_vfio
> >>>       - pci_dev
> >>>       };
> >>> Signed-off-by: Santosh Shukla <sshukla at mvista.com>
> >> ...
> >>> +/* For vfio only */
> >>> +struct virtio_vfio_dev {
> >>> +     bool            is_vfio;        /* True: vfio i/f,
> >>> +                                      * False: not a vfio i/f
> >>
> >> Well, this is weird; you are adding a flag to tell whether it's a
> >> vfio device __inside__ a vfio struct.
> >>
> >> Back to the topic, this flag is not necessary to me: you can
> >> check the pci_dev->kdrv flag.
> >>
> >
> > yes, I'll replace is_vfio with pci_dev->kdrv.
> >
> >>> +                                      */
> >>> +     struct rte_pci_device *pci_dev; /* vfio dev */
> >>
> >> Note that I have already added this field into virtio_hw struct
> >> at my latest virtio 1.0 pmd patchset.
> >>
> >> While I told you before that you should not develop patches based
> >> on my patcheset, I guess you can do that now. Since it should be
> >> in good shape and close to be merged.
> >
> > Okay, Before rebasing my v5 patch on your 1.0 virtio patch, I like to
> > understand which qemu version support virtio 1.0 spec?
> 
> Ignore, I figured out in other thread,
> qemu version >2.4, such as 2.4.1 or 2.5.0.

It will not matter. You can continue using the old legacy virtio, which
is the default case: my patchset keeps the backward compatibility.

What's worty noting is that virtio 1.0 uses memory mmaped bar space for
configuration, instead of ioport reading/writing. Therefore, I'd suggest
you to keep testing with legacy virtio, to make sure the VFIO stuff works.
And off course, virtio 1.0 testing is also welcome, to make sure it works
on ARM as well.

	--yliu


More information about the dev mailing list