[libvirt] [PATCH] Force FLR on for buggy SR-IOV devices.
Eric Blake
eblake at redhat.com
Fri Jul 23 19:34:23 UTC 2010
On 07/23/2010 01:21 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.
>
> +
> + if (virAsprintf(&path, PCI_SYSFS "devices/%s/physfn", dev->name)< 0) {
Weird spacing around <
> + VIR_ERROR("Failed to allocate memory when checking FLR for device %s",
> + dev->id);
If this fails, it is likely that other code will run out of memory soon,
too. Why not just call the standard git OOM handler here?
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list