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

Chris Lalancette clalance at redhat.com
Mon Jul 26 20:39:43 UTC 2010


On 07/26/10 - 01:45:29PM, Eric Blake wrote:
> 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.

Thanks, I've pushed this.

--
Chris Lalancette




More information about the libvir-list mailing list