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 1079146

Summary: [svvp]two svvp jobs failed with nec-usb-xhci controller
Product: Red Hat Enterprise Linux 7 Reporter: lijin <lijin>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: ailan, juzhang, knoel, lijin, michen, rbalakri, virt-bugs, virt-maint, vrozenfe, yvugenfi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-19 11:50:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
kvm-svvp-win2k12R2-hck-log
none
win2k12R2-svvp-hck-log
none
latest hck log
none
20140520-hck-log file none

Description lijin 2014-03-21 04:53:12 UTC
Created attachment 877118 [details]
kvm-svvp-win2k12R2-hck-log

Description of problem:
following jobs failed with nec-usb-xhci controller
"USB Exposed Port System Test"
"PCI Hardware Compliance Test For Systems"

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-1.5.3-52.el7.x86_64
kernel-3.10.0-99.el7.x86_64
seabios-1.7.2.2-11.el7.x86_64
virtio-win-1.6.8-4.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1.boot guest with:
/usr/libexec/qemu-kvm --nodefaults --nodefconfig -m 256G -smp 64,cores=32,socket=2 -cpu Nehalem,+kvm_pv_unhalt,hv_spinlocks=0x1fff,hv_relaxed,hv_vapic,hv_time -M pc-i440fx-rhel7.0.0 -usb -device usb-tablet,id=tablet0 -drive file=win2012R2-intel-max.raw,if=none,id=drive-virtio0-0-0,format=raw,werror=stop,rerror=stop,cache=none,serial=number -device virtio-blk-pci,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup1 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:52:6a:27:3e,addr=0x04 -uuid fc5fc25f-0b20-41c4-90b6-0f112eca0876 -monitor stdio -vnc :5 -vga cirrus -name win2012R2-INTEL-MAX -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -cdrom /usr/share/virtio-win/virtio-win.iso -fda /usr/share/virtio-win/virtio-win-1.6.8_amd64.vfd -boot menu=on -device nec-usb-xhci,id=xhci0 -drive file=usb-storage-intel-max.raw,if=none,id=drive-usb-2-0,media=disk,format=raw,cache=none,werror=stop,rerror=stop,aio=threads -device usb-storage,bus=xhci0.0,drive=drive-usb-2-0,id=usb-2-0,removable=on -rtc base=localtime,clock=host,driftfix=slew -chardev socket,id=b111a,path=/tmp/monitor-win2012R2-intel-max,server,nowait -mon chardev=b111a,mode=readline

2.submit jobs in hck2.1

Actual results:
job failed

Expected results:
job can pass

Additional info:
Jobs can pass with usb-ehci.

Comment 1 Ronen Hod 2014-03-23 11:48:57 UTC
Lijin,

Just to be sure. Does this bug reproduce also without hv_time?

Comment 2 lijin 2014-03-24 01:58:42 UTC
(In reply to Ronen Hod from comment #1)
> Lijin,
> 
> Just to be sure. Does this bug reproduce also without hv_time?

yes,this issue can be reproduced without hv_time

Comment 6 lijin 2014-05-13 06:55:15 UTC
Created attachment 895016 [details]
win2k12R2-svvp-hck-log

Comment 12 lijin 2014-05-15 07:22:26 UTC
Created attachment 895755 [details]
latest hck log

paste the error message here for easier view:
Port 1 is unmapped.A device was found on the port, but nothing was found on the companion port.This could mean a device other than a hub was plugged in to the port, or that the port is unmapped. Please ensure a hub is plugged in and the port is mapped.
Port 2 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 3 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 4 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 5 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 6 is unmapped.A device was found on the port, but nothing was found on the companion port.the port is unmapped. Please ensure a hub is plugged in and the port is mapped.
Port 7 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 8 is reported as user removable, but no device was found. Please attach a device and rerun the test

Comment 13 lijin 2014-05-15 09:51:06 UTC
Hi Gerd,following is the test description and requirement,we are confused about the test configuration,such as he concept of companion port,whether we should add a usb-hub,how many usb disk should we add...
http://msdn.microsoft.com/en-us/library/windows/hardware/jj123655.aspx

Could you give us a recommendation how to run it,that will be nice if you could give us a qemu-kvm command.

I tried following scenarios,all failed:
1.four usb-storage attached to xhci directly:
Error message:
Port 5~6 is super speed, but was not mapped to a companion port.Please ensure that the hub under test is specification compliant and if part of a system or host controller, that it is specified correctly in ACPI.

2.eight usb-storage attached to usb-hub,and the usb hub attached to xhci
Error message:
Port 1 is unmapped.A device was found on the port, but nothing was found on the companion port.This could mean a device other than a hub was plugged in to the port, or that the port is unmapped. Please ensure a hub is plugged in and the port is mapped.

3.four usb-storage attched to the usb-hub and other 4 low speed device(usb-tablet,usb-kbd) also attached to usb-hub:
Error message:
Port 1 is unmapped.A device was found on the port, but nothing was found on the companion port.This could mean a device other than a hub was plugged in to the port, or that the port is unmapped. Please ensure a hub is plugged in and the port is mapped.

4.four usb-storage attached to xhci + four usb-storage attached to echi
Error message:
Port 5~6 is super speed, but was not mapped to a companion port.Please ensure that the hub under test is specification compliant and if part of a system or host controller, that it is specified  correctly in ACPI.

5.four usb-storage attached to one xhci and four usb-storage attached to anoher xchi:
Port 5~6 is super speed, but was not mapped to a companion port.Please ensure that the hub under test is specification compliant and if part of a system or host controller, that it is specified correctly in ACPI.

Comment 16 Gerd Hoffmann 2014-05-15 10:17:52 UTC
> http://msdn.microsoft.com/en-us/library/windows/hardware/jj123655.aspx

Ah, that looks like the documentation I was asking for.

> Port 5~6 is super speed, but was not mapped to a companion port.Please
> ensure that the hub under test is specification compliant and if part of a
> system or host controller, that it is specified correctly in ACPI.

ACPI.  Hmm.  We don't do any acpi stuff in xhci, which is probably the root cause of the problem.

I'll go read the msdn page ...

Comment 17 Gerd Hoffmann 2014-05-15 10:51:37 UTC
Looks like windows expects the virtual port mapping being the other way around:
We have usb2 ports first, windows wants usb3 ports first (or acpi describing port mappings).

Next try: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7460459
[ still building atm ]

Comment 18 juzhang 2014-05-19 01:32:20 UTC
Hi Lijin,

Can you have a try comment17 and update the testing result?

Best Regards,
Junyi

Comment 19 lijin 2014-05-19 02:09:56 UTC
(In reply to Gerd Hoffmann from comment #17)
> Looks like windows expects the virtual port mapping being the other way
> around:
> We have usb2 ports first, windows wants usb3 ports first (or acpi describing
> port mappings).
> 
> Next try: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7460459
> [ still building atm ]

try with this build,job still failed as:
Port 1 is reported as user removable, but no device was found. Please attach a device and rerun the test
 Port 2 is unmapped,A device was found on the port, but nothing was found on the companion port.This could mean a device other than a hub was plugged in to the port, or that the port is unmapped. Please ensure a hub is plugged in and the port is mapped.
Port 3 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 4 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 5 is unmapped.A device was found on the port, but nothing was found on the companion port. This could mean a device other than a hub was plugged in to the port, or that  the port is unmapped. Please ensure a hub is plugged in and the port is mapped.
Port 6 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 7 is reported as user removable, but no device was found. Please attach a device and rerun the test
Port 8 is reported as user removable, but no device was found. Please attach a device and rerun the test

qemu-kvm command:
 /usr/libexec/qemu-kvm --nodefaults --nodefconfig -m 4G -smp 4 -cpu Nehalem,+kvm_pv_unhalt,hv_spinlocks=0x1fff,hv_relaxed,hv_vapic,hv_time -M pc-i440fx-rhel7.0.0 -drive file=win2012R2-svvp.raw,if=none,id=drive-virtio0-0-0,format=raw,werror=stop,rerror=stop,cache=none,serial=number -device virtio-blk-pci,drive=drive-virtio0-0-0,id=virti0-0-0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup1 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:52:52:6a:29:5f,addr=0x04 -uuid bcac2973-9aa9-4172-82b0-5969fc160602 -monitor stdio -vnc :1 -vga cirrus -name win2012R2-bug-svvp -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -cdrom /usr/share/virtio-win/virtio-win.iso -fda /usr/share/virtio-win/virtio-win-1.6.8_amd64.vfd -boot menu=on -device nec-usb-xhci,id=xhci0 -device usb-tablet,bus=xhci0.0,id=tablet0,port=1 -drive file=usb-storage-intel-max.raw,if=none,id=drive-usb-2-0,media=disk,format=raw,cache=none,werror=stop,rerror=stop,aio=threads -device usb-storage,bus=xhci0.0,drive=drive-usb-2-0,id=usb-2-0,removable=on,port=2 -rtc base=localtime,clock=host,driftfix=slew -chardev socket,id=b111a,path=/tmp/monitor-win2012R2-intel-max,server,nowait -mon chardev=b111a,mode=readline

Comment 20 Gerd Hoffmann 2014-05-19 06:00:47 UTC
> try with this build,job still failed as:

Can you please also upload the full hck log?

Comment 21 Mike Cao 2014-05-19 06:10:30 UTC
(In reply to Gerd Hoffmann from comment #20)
> > try with this build,job still failed as:
> 
> Can you please also upload the full hck log?

Test Log Report - Complete Report 

Report Summary 
Test Results 
Description Total Pass Fail Warning Blocked Skipped Pass Rate 
Direct count of EndTest results 1 0 1 0 0 0 0.00% 
 TimeStamp Total Pass Fail Warning Blocked Skipped Pass Rate 
 
Machine, Process, and OS Information 
Machine Name OS Version Build VBL BuildDate Platform Language ServicePack Config 
 (No Machine Information Trace Available) 
 Base Time Process ID Thread ID Process Name 
5/19/2014 10:04:35.753 AM 2928 2924 C:\WLK\JobsWorkingDir\Tasks\WTTJobRun7E1B3DBA-8A40-4DE1-8B10-836CD77D9244\cscript.exe 
 
Report Details 
Complete Test Log 
Runtime 5/19/2014 10:04:35.753 AM _  
Runtime Index:   393539694 
Machine:   win2012R2-svvp 
Process Name:   C:\WLK\JobsWorkingDir\Tasks\WTTJobRun7E1B3DBA-8A40-4DE1-8B10-836CD77D9244\cscript.exe 
Process ID:   2928 
Thread ID:   2924 
Context _  _  
Context Index:   384048256 
Current:   WTTLOG 
Parent:   ROOT 
Context _  _  
Context Index:   2487259066 
Current:   Check Exposed Port Mappings 
Parent:   WTTLOG 
Start Test 5/19/2014 10:04:35.753 AM Check Exposed Port Mappings 
Message 5/19/2014 10:04:35.753 AM ========================================== 
Message 5/19/2014 10:04:35.753 AM DUT : Name: USB Root Hub (xHCI) 
Message 5/19/2014 10:04:35.753 AM : Speed: 
Message 5/19/2014 10:04:35.753 AM : CntID:00000000-0000-0000-ffff-ffffffffffff 
Message 5/19/2014 10:04:35.753 AM : Exposed Ports Count:8 
Message 5/19/2014 10:04:35.753 AM : Exposed Port Validation: 
Message 5/19/2014 10:04:35.753 AM : Exposed Port : 1 
Error 5/19/2014 10:04:35.753 AM : : Port 1 is reported as user removable, but no device was found. Please attach a device and rerun the test 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:35.753 AM : Exposed Port : 2 
Message 5/19/2014 10:04:35.753 AM : : Device: USB Mass Storage Device 
Message 5/19/2014 10:04:35.753 AM : : ContainerID: 97cf656a-c276-573e-bd07-2536aceec0c2 
Message 5/19/2014 10:04:35.753 AM : : CompIndex: 6 
Message 5/19/2014 10:04:35.753 AM : : CompHub: \\?\USB#ROOT_HUB30#4&17feea07&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8} 
Message 5/19/2014 10:04:35.753 AM : : CParent: USB Root Hub (xHCI) 
Message 5/19/2014 10:04:35.753 AM : : ConfParent: 00000000-0000-0000-ffff-ffffffffffff 
Error 5/19/2014 10:04:35.753 AM : : Port 2 is unmapped. 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Error 5/19/2014 10:04:35.753 AM : : A device was found on the port, but nothing was found on the companion port. 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Error 5/19/2014 10:04:35.753 AM : : This could mean a device other than a hub was plugged in to the port, or that 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Error 5/19/2014 10:04:35.753 AM : : the port is unmapped. Please ensure a hub is plugged in and the port is mapped. 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:35.753 AM : Exposed Port : 3 
Error 5/19/2014 10:04:35.753 AM : : Port 3 is reported as user removable, but no device was found. Please attach a device and rerun the test 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:35.753 AM : Exposed Port : 4 
Error 5/19/2014 10:04:35.753 AM : : Port 4 is reported as user removable, but no device was found. Please attach a device and rerun the test 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:35.753 AM : Exposed Port : 5 
Message 5/19/2014 10:04:35.753 AM : : Device: USB Input Device 
Message 5/19/2014 10:04:35.753 AM : : ContainerID: 08abe0b7-7144-5605-8dce-e4ae9f0296d3 
Message 5/19/2014 10:04:35.753 AM : : CompIndex: 1 
Message 5/19/2014 10:04:36.753 AM : : CompHub: \\?\USB#ROOT_HUB30#4&17feea07&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8} 
Message 5/19/2014 10:04:36.753 AM : : CParent: USB Root Hub (xHCI) 
Message 5/19/2014 10:04:36.753 AM : : ConfParent: 00000000-0000-0000-ffff-ffffffffffff 
Error 5/19/2014 10:04:36.753 AM : : Port 5 is unmapped. 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Error 5/19/2014 10:04:36.753 AM : : A device was found on the port, but nothing was found on the companion port. 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Error 5/19/2014 10:04:36.753 AM : : This could mean a device other than a hub was plugged in to the port, or that 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Error 5/19/2014 10:04:36.753 AM : : the port is unmapped. Please ensure a hub is plugged in and the port is mapped. 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:36.753 AM : Exposed Port : 6 
Error 5/19/2014 10:04:36.753 AM : : Port 6 is reported as user removable, but no device was found. Please attach a device and rerun the test 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:36.753 AM : Exposed Port : 7 
Error 5/19/2014 10:04:36.753 AM : : Port 7 is reported as user removable, but no device was found. Please attach a device and rerun the test 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:36.753 AM : Exposed Port : 8 
Error 5/19/2014 10:04:36.753 AM : : Port 8 is reported as user removable, but no device was found. Please attach a device and rerun the test 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:36.753 AM ------------------------------------------ 
Message 5/19/2014 10:04:36.753 AM RES : Name: USB Root Hub (xHCI) 
Message 5/19/2014 10:04:36.753 AM RES : Ports: 8 
Message 5/19/2014 10:04:36.753 AM RES : Connected: 2 
Error 5/19/2014 10:04:36.753 AM RES : Connected: Fail 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
Message 5/19/2014 10:04:36.753 AM RES : Mapped: 0 
Error 5/19/2014 10:04:36.753 AM RES : Mapped: Fail 
File:   hubexposedport.vbs Line: 0 
Error Type:   HRESULT 
Error Code:   0x1 
Error Text:   Incorrect function. 
End Test 5/19/2014 10:04:36.753 AM Check Exposed Port Mappings 
Result:   Fail

Comment 22 Gerd Hoffmann 2014-05-19 07:31:44 UTC
(In reply to Mike Cao from comment #21)
> (In reply to Gerd Hoffmann from comment #20)
> > > try with this build,job still failed as:
> > 
> > Can you please also upload the full hck log?
> 
> Test Log Report - Complete Report 

Can you please upload the raw *.hckx file as bug attachment?

Comment 23 lijin 2014-05-20 00:33:40 UTC
Created attachment 897354 [details]
20140520-hck-log file

sorry for the late response,I take sick leave these two days

Comment 24 Gerd Hoffmann 2014-05-20 07:25:50 UTC
> http://msdn.microsoft.com/en-us/library/windows/hardware/jj123655.aspx

<quote>
USB 3.0 hubs were not detected on all connectors.
You must connect hubs to all connectors.
</quote>

Hmm.  No easy way out.  We don't have a virtual usb3.0 hub in qemu (the implemented usb-hub is usb 1.0 only).