[libvirt] [PATCH] Force FLR on for buggy SR-IOV devices.

Eric Blake eblake at redhat.com
Mon Jul 26 19:45:29 UTC 2010


On 07/26/2010 12:51 PM, Chris Lalancette wrote:
> Some buggy PCI devices actually support FLR, but
> forget to advertise that fact in their PCI config space.
> However, Virtual Functions on SR-IOV devices are
> *required* to support FLR by the spec, so force has_flr
> on if this is a virtual function.
> 
> Signed-off-by: Chris Lalancette <clalance at redhat.com>
> ---
>  src/util/pci.c |   48 ++++++++++++++++++++++++++++++++++++++++++++----
>  1 files changed, 44 insertions(+), 4 deletions(-)
>  
> +    /* there are some buggy devices that do support FLR, but forget to
> +     * advertise that fact in their capabilities.  However, FLR is *required*
> +     * to be present for virtual functions (VFs), so if we see that this
> +     * device is a VF, we just assume FLR works
> +     */
> +
> +    if (virAsprintf(&path, PCI_SYSFS "devices/%s/physfn", dev->name) < 0) {
> +        virReportOOMError();
> +        return -1;

ACK - this fixed my concerns from v1.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100726/fd38cc86/attachment-0001.sig>


More information about the libvir-list mailing list