Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 729104

Summary: qemu-kvm: pci needs multifunction property
Product: Red Hat Enterprise Linux 6 Reporter: Gerd Hoffmann <kraxel>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: alex.williamson, bugproxy, donald.open, juzhang, lagarcia, mkenneth, nachandr, tburke, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.180.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 15:55:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 701790, 704634, 705085    
Attachments:
Description Flags
qemu config file, ich9 usb
none
multifunction support for virtio none

Description Gerd Hoffmann 2011-08-08 17:55:26 UTC
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.

Comment 3 juzhang 2011-08-09 02:05:26 UTC
Hi,Gerd

   Would you please provide efficient way for qe reproduce and verify this issue?the more details,the better,thanks

Comment 4 Gerd Hoffmann 2011-08-09 05:49:28 UTC
Created attachment 517347 [details]
qemu config file, ich9 usb

Comment 5 Gerd Hoffmann 2011-08-09 05:54:50 UTC
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)

Comment 9 juzhang 2011-09-01 04:49:25 UTC
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

Comment 11 Nandini Chandra 2011-09-19 18:49:33 UTC
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

Comment 12 juzhang 2011-11-29 08:07:52 UTC
*** Bug 694555 has been marked as a duplicate of this bug. ***

Comment 13 IBM Bug Proxy 2011-11-29 08:14:08 UTC
Created attachment 537810 [details]
multifunction support for virtio

Comment 14 errata-xmlrpc 2011-12-06 15:55:33 UTC
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

Comment 15 Ronen Hod 2011-12-18 09:13:43 UTC
*** Bug 731845 has been marked as a duplicate of this bug. ***

Comment 16 IBM Bug Proxy 2011-12-19 15:58:56 UTC
------- Comment From mcintire.com 2011-12-19 10:34 EDT-------
IBM is also closing this feature since it is in 6.2