Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1519683 - usb-kbd not work when boot guest with usb-kbd
Summary: usb-kbd not work when boot guest with usb-kbd
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.5
Hardware: x86_64
OS: Windows
medium
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Gu Nini
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-01 07:44 UTC by Minjia Cai
Modified: 2018-01-15 12:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-15 12:10:05 UTC


Attachments (Terms of Use)

Description Minjia Cai 2017-12-01 07:44:45 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Minjia Cai 2017-12-01 07:59:40 UTC
Description of problem:
usb-kbd  not work when boot guest with usb-kbd

Version-Release number of selected component (if applicable):
Host:
Compose: RHEL-7.5-20171107.1
kernel-3.10.0-799.el7
qemu-kvm-rhev-2.10.0-9.el7
seabios-1.11.1-1.el7

Guest:
Compose: 
win2016(en_windows_server_2016_x64_dvd_9718492.iso)
virtio-win-prewhql-0.1-143.iso
How reproducible:
5/5

Steps to Reproduce:
1.boot guest :
   /usr/libexec/qemu-kvm \
-name guest=win10 \
-machine pc,accel=kvm \
-cpu SandyBridge \
-m 4096 \
-smp 2,maxcpus=6 \
-nodefaults \
-device nec-usb-xhci,id=usb,addr=0x1d.7,multifunction=on,bus=pci.0 \
-drive file=/home/micai/win2016-64-virtio-scsi.qcow2,format=qcow2,if=none,id=drive-virtio-disk0,cache=none \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-netdev tap,id=hostnet0,script=/etc/qemu-ifup \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=fa:16:3e:c1:97:c3,bus=pci.0,addr=0x4 \
-device virtio-scsi-pci,id=scsi_controller,bus=pci.0,addr=0x5 \
-drive id=drive_cdrom,if=none,format=raw,file=/home/micai/en_windows_server_2016_x64_dvd_9718492.iso   \
-device scsi-cd,bus=scsi_controller.0,id=cdrom,drive=drive_cdrom,bootindex=2 \
-rtc base=localtime,clock=host,driftfix=slew \
-boot order=cdn,once=c,menu=off,strict=off \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-device usb-kbd,id=usb-kbd1,bus=usb1.0,port=2 \
-spice disable-ticketing,port=5902 \
-k en-us \
-vga qxl \
-qmp tcp:0:8882,server,nowait \
-global qxl-vga.revision=3 \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-msg timestamp=on \
-monitor stdio \
-cdrom virtio-win-prewhql-0.1-143.iso \
-drive id=drive_virtiowin,if=none,snapshot=off,aio=native,cache=none,media=cdrom,file=/home/micai/virtio-win-prewhql-0.1-143.iso \
-device scsi-cd,bus=scsi_controller.0,id=cdrom_virtiowin,drive=drive_virtiowin,bootindex=3 \

2.When the installation is complete, enter the password interface
3.After input finish, wait for 10s for showkey to terminate and check the output of showkey

Actual results:
No output shows that the keyboard does not work

Expected results:
The output is normal and the keyboard can work

Additional info:
Remove the usb-ksb command line. After starting the guest, you can set the password normally.

Comment 3 Minjia Cai 2017-12-01 08:27:21 UTC
1.Change qemu version information for:
[root@intel-e5530-8-2 qemu]# rpm -qa |grep qemu
qemu-kvm-rhev-debuginfo-2.9.0-16.el7_4.12.x86_64
qemu-kvm-common-rhev-2.9.0-16.el7_4.12.x86_64
ipxe-roms-qemu-20170123-2.git4e85b27.el7.noarch
qemu-kvm-rhev-2.9.0-16.el7_4.12.x86_64
qemu-kvm-tools-rhev-2.9.0-16.el7_4.12.x86_64
qemu-img-rhev-2.9.0-16.el7_4.12.x86_64

The problem still exists. Not a regression


2.Try some of the older controllers:
 1-device ich9-usb-ehci2,id=usb,addr=0x1d.7,multifunction=on,bus=pci.0 \
 2-device ich9-usb-uhci1,id=usb,addr=0x1d.7,multifunction=on,bus=pci.0 \

The problem still exists

Comment 4 Gerd Hoffmann 2018-01-12 10:22:03 UTC
> -device nec-usb-xhci,id=usb,addr=0x1d.7,multifunction=on,bus=pci.0 \

I suspect this is the problem here.  When using multifunction configuration there must be a .0 function, otherwise the guest will not find the pci device.

Can you see the xhci controller in device manager?

What happens if you change addr to "0x1d.0"?

Comment 5 Minjia Cai 2018-01-15 09:38:09 UTC
(In reply to Gerd Hoffmann from comment #4)
> > -device nec-usb-xhci,id=usb,addr=0x1d.7,multifunction=on,bus=pci.0 \
> 
> I suspect this is the problem here.  When using multifunction configuration
> there must be a .0 function, otherwise the guest will not find the pci
> device.
> 
> Can you see the xhci controller in device manager?
> 
> What happens if you change addr to "0x1d.0"?

(1)when I change addr to "0x1d.0"(-device nec-usb-xhci,id=usb,addr=0x1d.0,multifunction=on,bus=pci.0 \)The output is normal and the keyboard can work
(2) When addr to  0x1d.7, I didn't find the xhci controller in device manage.

Comment 6 Gerd Hoffmann 2018-01-15 12:10:05 UTC
> (1)when I change addr to "0x1d.0"(-device
> nec-usb-xhci,id=usb,addr=0x1d.0,multifunction=on,bus=pci.0 \)The output is
> normal and the keyboard can work
> (2) When addr to  0x1d.7, I didn't find the xhci controller in device manage.

Ok, so it happens because of the invalid pci configuration.


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