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 1438682 - [RFE] add support for qemu-xhci
Summary: [RFE] add support for qemu-xhci
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Han Han
URL:
Whiteboard:
Depends On: 1446570 1451189
Blocks: 1173757
TreeView+ depends on / blocked
 
Reported: 2017-04-04 08:06 UTC by Gerd Hoffmann
Modified: 2017-09-26 02:19 UTC (History)
14 users (show)

Fixed In Version: libvirt-3.2.0-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 00:05:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Gerd Hoffmann 2017-04-04 08:06:54 UTC
Description of problem:
qemu 2.9 got support for a new xhci controller variant: qemu-xhci.
libvirt should support that, and (if possible) prefer it over nec-xhci at least on !x86 architectures.

Comment 6 Jaroslav Suchanek 2017-04-21 13:10:11 UTC
v1 posted upstream:
https://www.redhat.com/archives/libvir-list/2017-April/msg00958.html

Comment 7 Pavel Hrdina 2017-04-28 10:00:59 UTC
Upstream commits:

commit 278e70f8f8bac9e6482099d7f3f1a7a8f2109b5f
Author: Pavel Hrdina <phrdina>
Date:   Thu Apr 13 12:25:25 2017 +0200

    qemu: add support for qemu-xhci USB controller

commit 568887a32f9985b95d998dd0d675255ea985013f
Author: Pavel Hrdina <phrdina>
Date:   Thu Apr 27 17:56:41 2017 +0200

    qemu: use qemu-xhci USB controller by default for ppc64 and aarch64

Comment 10 Han Han 2017-05-31 10:47:21 UTC
Verify it on libvirt-3.2.0-6.virtcov.el7.x86_64 qemu-kvm-rhev-2.9.0-7.el7.x86_64
1. Test the max ports of qemu-xhci
Edit a VM, set qemu-xhci ports as 16 and save it:
<controller type='usb' index='0' model='qemu-xhci' ports='16'/>

error: unsupported configuration: 'qemu-xhci' controller only supports up to '15' ports
Failed. Try again? [y,n,i,f,?]: 

Then set ports as 15, attach 15 disks to the usb controller:
+ sudo virsh attach-disk pc /exports/sda.img sda --targetbus usb
Disk attached successfully
+ sudo virsh attach-disk pc /exports/sdb.img sdb --targetbus usb
Disk attached successfully
....
+ sudo virsh attach-disk pc /exports/sdp.img sdp --targetbus usb
Disk attached successfully

Check all disks are in guest. Then detech them:
+ sudo virsh detach-disk pc sda
Disk detached successfully
+ sudo virsh detach-disk pc sdb
Disk detached successfully
...
+ sudo virsh detach-disk pc sdp
Disk detached successfully


2. Start a guest with following devices(disk, hostdev, mouse, keyboard, tablet, hub, redirdev) attach to qemu-xhci controller:
...
<disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/exports/raw'/>
      <target dev='sda' bus='usb'/>
      <address type='usb' bus='0' port='2'/>
    </disk>
<hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0930'/>
        <product id='0x6545'/>
      </source>
      <address type='usb' bus='0' port='6'/>
    </hostdev>
<input type='mouse' bus='usb'>
      <address type='usb' bus='0' port='3'/>
    </input>
<input type='keyboard' bus='usb'>
      <address type='usb' bus='0' port='4'/>
    </input>
<input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='5'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
<rng model='virtio'>
      <backend model='random'>/dev/urandom</backend>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </rng>
<hub type='usb'>
      <address type='usb' bus='0' port='7'/>
    </hub>
...
Check all devices works well.

Migrate the guest to RHEL7.3 host:
# virsh migrate pc qemu+ssh://xxxxx/system --verbose --unsafe
root.eng.pek2.redhat.com's password: 
error: unsupported configuration: Unknown model type 'qemu-xhci'

Migrate the guest to RHEL7.4 host:
# virsh migrate pc qemu+ssh://xxx/system --verbose --unsafe
Migration: [100 %]

Comment 11 Han Han 2017-05-31 10:48:55 UTC
gsun, please check if the controller works well on ppc. Thks.

Comment 12 Dan Zheng 2017-06-02 06:18:04 UTC
Test with 
libvirt-libs-3.2.0-7.el7.ppc64le
qemu-kvm-rhev-2.9.0-7.el7.ppc64le

1. Test the max ports of qemu-xhci
Edit a VM, set qemu-xhci ports as 16 and save it:
<controller type='usb' index='0' model='qemu-xhci' ports='16'/>

error: unsupported configuration: 'qemu-xhci' controller only supports up to '15' ports
Failed. Try again? [y,n,i,f,?]: 

2. set ports as 15, attach 13 disks to the usb controller (2 left for usb mouse and usb keyboard)
# virsh attach-disk vm1 /home/test/sda.img sda --targetbus usb --sub-driver qcow2
Disk attached successfully
...

Check all disks are working well in guest. Then detech them ok.

3. Start a guest with following devices(disk, hostdev, mouse, keyboard, tablet, hub, redirdev) attach to qemu-xhci controller 
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/home/dzheng/sd2'/>
      <backingStore/>
      <target dev='sda' bus='usb'/>
      <alias name='usb-disk0'/>
      <address type='usb' bus='0' port='3'/>
    </disk>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='5'/>
    </input>
    <input type='keyboard' bus='usb'>
      <alias name='input1'/>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='usb'>
      <alias name='input2'/>
      <address type='usb' bus='0' port='2'/>
    </input>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x1d6b'/>
        <product id='0x0003'/>
        <address bus='2' device='1'/>
      </source>
      <alias name='hostdev0'/>
      <address type='usb' bus='0' port='6'/>
    </hostdev>
    <hub type='usb'>
      <alias name='hub0'/>
      <address type='usb' bus='0' port='7'/>
    </hub>
Check all devices works well.

4. Migrate
Migrate the guest to RHEL7.3 host:
# virsh migrate vm1 qemu+ssh://xxxxx/system --verbose --unsafe
...
error: unsupported configuration: Unknown model type 'qemu-xhci'

Migrate the guest to RHEL7.4 host:
# virsh migrate vm1 qemu+ssh://xxx/system --verbose --unsafe
Migration: [100 %]


PASS.

Comment 13 Han Han 2017-06-02 06:48:15 UTC
Since tests passed in comment10 and comment12, mark it as verified.

Comment 14 errata-xmlrpc 2017-08-02 00:05:54 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.

https://access.redhat.com/errata/RHEA-2017:1846

Comment 15 errata-xmlrpc 2017-08-02 01:30:05 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.

https://access.redhat.com/errata/RHEA-2017:1846


Note You need to log in before you can comment on or make changes to this bug.