Red Hat Bugzilla – Bug 729104
qemu-kvm: pci needs multifunction property
Last modified: 2013-11-18 14:27:03 EST
Description of problem: Sidestepping the missing multifunction property in RHEL-6 with some magic was vetoed in patch review, so I'm going to backport the patches which implement the multifunction property instead.
Hi,Gerd Would you please provide efficient way for qe reproduce and verify this issue?the more details,the better,thanks
Created attachment 517347 [details] qemu config file, ich9 usb
All pci devices in qemu get a new property named "multifunction". This can be used to create --for example -- multifunction usb controllers. qemu $usualoptions -readconfig ich9-ehci-uhci.cfg ^^^^^^^^^^^^^^^^^^ comment #4 attachment will create such a controller in slot 1d. Inside the (linux) guest it will look like this: [root@rhel6 ~]# lspci -s 1d 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
Can reproduce this issue with qemu-kvm-0.12.1.2-2.179.el6. Steps: 1. boot guest with usb-ehci enable multifunction /qemu-kvm ............... -device usb-ehci,id=echi,multifunction=on Results: qemu-kvm: -device usb-ehci,id=echi,multifunction=on: Property 'usb-ehci.multifunction' not found Verified this issue with qemu-kvm-0.12.1.2-2.184.el6 I tried two scenarios. 1. 8 usb controller & usb-hub. 1.1#cat test.cfg [device "ehci"] driver = "ich9-usb-ehci1" addr = "1d.7" multifunction = "on" [device "uhci-1"] driver = "ich9-usb-uhci1" addr = "1d.0" multifunction = "on" masterbus = "ehci.0" firstport = "0" [device "uhci-2"] driver = "ich9-usb-uhci2" addr = "1d.1" multifunction = "on" masterbus = "ehci.0" firstport = "2" [device "uhci-3"] driver = "ich9-usb-uhci3" addr = "1d.2" multifunction = "on" masterbus = "ehci.0" firstport = "4" [device "uhci-4"] driver = "ich9-usb-uhci1" addr = "1d.3" multifunction = "on" [device "uhci-5"] driver = "ich9-usb-uhci2" addr = "1d.4" multifunction = "on" [device "uhci-6"] driver = "ich9-usb-uhci3" addr = "1d.5" multifunction = "on" [device "uhci-7"] driver = "ich9-usb-uhci2" addr = "1d.6" multifunction = "on" 1.2 boot guest with test.cfg and usb-hub # Resutls: in gust #lspci -s 1d 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) 00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) 00:1d.4 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) 00:1d.5 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) 00:1d.6 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) #lsusb lsusb Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 002: ID 0000:0000 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 2.more than 8 pci devices(usb controller) Results: *** EHCI support is under development *** qemu-kvm:aa.cfg:59: Property 'ich9-usb-uhci2.addr' doesn't take value '1d.8' This issue has been fixed
I've verified that with qemu-kvm-0.12.1.2-2.180,I can assign multiple functions of a dual-port Broadcom NetXtreme II BCM5709 Gigabit Ethernet (rev 20) to a RHEL 6 guest on RHEL 6.1 host.I was not able to assign multiple functions of the NIC with older versions of qemu-kvm. lspci output from Host ---------------------- 02:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20) 02:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20) ----------------------- Command line used to start the guest: /usr/libexec/qemu-kvm -m 1024 -name "RHEL6_com" -drive file=rhel6.1.qcow2,if=virtio -usb -usbdevice tablet -net nic,model=virtio,macaddr=00:16:3E:71:1E:A2 -net tap,ifname=tap1,script=no,downscript=no -device pci-assign,host=02:00.0,multifunction=on,addr=5.0 -device pci-assign,host=02:00.1,addr=5.1 -vnc :0 lspci output from guest ---------------------- 00:05.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20) 00:05.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20) ----------------------- On the guest,this is how the functions get mapped: 02:00.0 ->00:05.0 02:00.1 ->00:05.1
*** Bug 694555 has been marked as a duplicate of this bug. ***
Created attachment 537810 [details] multifunction support for virtio
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2011-1531.html
*** Bug 731845 has been marked as a duplicate of this bug. ***
------- Comment From mcintire@us.ibm.com 2011-12-19 10:34 EDT------- IBM is also closing this feature since it is in 6.2