Displaying 3 results from an estimated 3 matches for "pci_set_dev_assigned".
2018 Jun 01
3
[PATCH v2] virtio_pci: support enabling VFs
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 Bie <tiwei.bie at intel.com>
Acked-by: Stefan Hajnoczi <stefanha at redhat.com>
Acked-by: Michael S. Tsirkin <mst at redhat.com>
---
2018 Jun 01
3
[PATCH v2] virtio_pci: support enabling VFs
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 Bie <tiwei.bie at intel.com>
Acked-by: Stefan Hajnoczi <stefanha at redhat.com>
Acked-by: Michael S. Tsirkin <mst at redhat.com>
---
2018 Jun 01
0
[PATCH v2] virtio_pci: support enabling VFs
...OV))
> + return -EINVAL;
> +
> + if (pci_vfs_assigned(pci_dev))
> + return -EPERM;
Not a comment on this patch - existing code has the
same race - but generally
1. this seems racy since assigning vfs does not seem
to take device lock
2. does this work correctly for kvm at all?
pci_set_dev_assigned seems to be only called by xen.
Can you look at addressing this pls?
> +
> + if (num_vfs == 0) {
> + pci_disable_sriov(pci_dev);
> + return 0;
> + }
> +
> + ret = pci_enable_sriov(pci_dev, num_vfs);
> + if (ret < 0)
> + return ret;
> +
> + return num_vfs;
&...