[virtio-dev] Re: [PATCH] virtio_pci: support enabling VFs

2018-05-30 Thread Rustad, Mark D
On May 30, 2018, at 9:54 AM, Duyck, Alexander H wrote: On Wed, 2018-05-30 at 09:44 -0700, Rustad, Mark D wrote: On May 30, 2018, at 9:22 AM, Michael S. Tsirkin wrote: +static int virtio_pci_sriov_configure(struct pci_dev *pci_dev, int num_vfs) +{ + struct virtio_pci_device *vp_dev

Re: [virtio-dev] [PATCH] virtio_pci: support enabling VFs

2018-05-30 Thread Rustad, Mark D
On May 30, 2018, at 1:55 AM, Tiwei Bie wrote: There is a new feature bit allocated in virtio spec to support SR-IOV (Single Root I/O Virtualization): https://github.com/oasis-tcs/virtio-spec/issues/11 This patch enables the support for this feature bit in virtio driver. Signed-off-by: Tiwei

[virtio-dev] Re: [PATCH] virtio_pci: support enabling VFs

2018-05-30 Thread Rustad, Mark D
On May 30, 2018, at 9:22 AM, Michael S. Tsirkin wrote: +static int virtio_pci_sriov_configure(struct pci_dev *pci_dev, int num_vfs) +{ + struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev); + struct virtio_device *vdev = _dev->vdev; + int (*sriov_configure)(struct

[virtio-dev] Re: [RFC PATCH V2] virtio_pci: Add SR-IOV support

2018-02-22 Thread Rustad, Mark D
> On Feb 22, 2018, at 10:26 AM, Christoph Hellwig wrote: > > Can we move this into common code as a a generic_sriov_configure > helper? Nothing is really virtio specific, and it seems like > some other drivers could also use it, e.g. ena or nvme. That seems like a good idea

[virtio-dev] Re: [RFC PATCH V4] pci: virtio_pci: Add SR-IOV support for virtio_pci devices

2018-02-26 Thread Rustad, Mark D
Alex, > On Feb 26, 2018, at 7:26 AM, Alexander Duyck > wrote: > > Mark, > > In the future please don't put my "Reviewed-by" on a patch that I > haven't reviewed. I believe I reviewed one of the earlier patches, but > I hadn't reviewed this version. I'm very sorry.

Re: [virtio-dev] [pci PATCH v7 1/5] pci: Add pci_sriov_configure_simple for PFs that don't manage VF resources

2018-03-28 Thread Rustad, Mark D
On Mar 15, 2018, at 11:41 AM, Alexander Duyck wrote: > From: Alexander Duyck > > This patch adds a common configuration function called > pci_sriov_configure_simple that will allow for managing VFs on devices > where the PF is not capable

Re: [virtio-dev] [pci PATCH v7 2/5] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices

2018-04-03 Thread Rustad, Mark D
On Apr 3, 2018, at 11:27 AM, Michael S. Tsirkin wrote: I'm not sure why you would need a feature bit. The capability is controlled via PCI configuration space. If it is present the device has the capability. If it is not then it does not. Basically if the PCI configuration

[virtio-dev] Re: [RFC PATCH V3] virtio_pci: Add SR-IOV support

2018-02-27 Thread Rustad, Mark D
> On Feb 27, 2018, at 7:35 AM, David Miller wrote: > > I don't like these helpers on many different levels. > So kill off pci_sriov_enable() helper completely, it is unnecessary, > and rename the disable helper so that it says something meaningful to > the reader. Yes.