This bug prevents multi-function PCI devices from being assigned to a KVM guest using libvirt. +++ This bug was initially created as a clone of Bug #515689 +++ This code is wrong: /* For now, we just refuse to do a power management reset * if there are other functions on this device. * In future, we could allow it so long as those functions * are not in use by the host or other guests. */ if (pciDeviceContainsOtherFunctions(conn, dev)) { VIR_WARN("%s contains other functions, not resetting", dev->name); return -1; } It turns out that PM reset does not affect other functions on a mutli-function device. --- Additional comment from markmc on 2009-08-14 03:34:06 EDT --- Patch committed upstream: http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=64a6682b93
libvirt-0.6.3-23.el5 has been built in dist-5E-qu-candidate with the patches, Daniel
Hi Daniel: I don't know how to verify the bug, if the multi-function PCI devices are type of the PCI device with the support for SR/IOV like intel82576 NIC? I tried libvirt-0.6.3-22.el5 version on KVM host with version kvm-83-140.el5, it seems ok to assign VF to guest. Thank you for your more information.
What you're looking for is a machine where by if you do: $> virsh nodedev-dettach ... $> virsh nodedev-reset ... on RHEL5.4 (or any libvirt version before libvirt-0.6.3-23.el5) that nodedev-reset fails and prints a "contains other functions, not resetting" message to /var/log/messages once you've found suitable hardware to do that, then you can update libvirt and check if nodedev-reset now succeeds
The bug has been fixed on libvirt-0.6.3-30.el5 I reproduced the bug on libvirt-0.6.3-22.el5 Is is necessary to have a machine with multi-function PCI device which doesn't support FLR feature and support Power Management feature. then, virsh nodedev-dettach ... virsh nodedev-reset ... It reports errors to standard output device: error: Failed to reset device pci_10df_fe00 error: this function is not supported by the hypervisor: No PCI reset capability available for 0000:01:00.1 and simultaneously, prints a error log into /var/log/messages, like: Jan 27 15:51:43 intel-5504-12-1 libvirtd: 15:51:43.259: warning : 0000:01:00.1 contains other functions, not resetting Jan 27 15:51:43 intel-5504-12-1 libvirtd: 15:51:43.259: error : this function is not supported by the hypervisor: No PCI reset capability available for 0000:01:00.1 on libvirt-0.6.3-30.el5, no errors occurred.
Created attachment 387003 [details] nodedev-list output
Created attachment 387004 [details] lscpi-vvv-n output
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0205.html