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 947695

Summary: fail to type any character in win2012 64bit guest with usb-kbd device under Q35
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Miki Mishael <mmishael>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: acathrow, bcao, chayang, hhuang, juzhang, kraxel, mazhang, michen, mmishael, qzhang, rhod, shuang, sluo, virt-bugs, virt-maint, xfu, 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: 2013-12-24 13:34:18 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
the device manager for usb-kbd under q35.
none
the device manager for usb-kbd under pc-i440fx-1.4.
none
Tested usb-kbd under q35.png
none
diffrun.txt none

Description Sibiao Luo 2013-04-03 03:37:16 UTC
Description of problem:
Boot win2012 64bit guest with usb-kbd device under Q35, but cann't type any characters in guest system after it boot up. I check the device manager that there is no 'HID Keyboard Device' in 'Keyboards', just 'Standard PS/2 Keyboard'.
BTW, 
1.If i test win2012 64bit guest with usb-kbd device under pc-i440fx-1.4, it have no such issue.
2.I also tested win7 64bit and rhel7.0 guest under Q35, both of them have no such issue.

Version-Release number of selected component (if applicable):
host info:
kernel-3.9.0-0.rc4.45.el7.x86_64
qemu-kvm-1.4.0-1.el7.x86_64
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64
guest info:
windows: win2012 64bit

How reproducible:
100%

Steps to Reproduce:
1.Boot win201264bit guest with usb-kbd device under Q35.
e.g:# /usr/libexec/qemu-kvm -S -M q35 -cpu SandyBridge...-readconfig /home/ich9-ehci-uhci.cfg -device usb-tablet,id=input0 -device usb-mouse,id=mouse0 -device usb-kbd,id=kbd0
2.type some characters in guest after it boot up.
3.check the device manager.
  
Actual results:
after step 2, can't type any character in win2012 64bit guest.
after step 3, there is no 'HID Keyboard Device' in 'Keyboards', just 'Standard PS/2 Keyboard'. I will attach the screenshot later.

Expected results:
it can type any characters in guest correctly.

Additional info:

Comment 1 Sibiao Luo 2013-04-03 03:38:06 UTC
My qemu-kvm command line:
# /usr/libexec/qemu-kvm -S -M q35 -cpu SandyBridge -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -name sluo-test -uuid ed09fa10-6ffe-4811-a42f-0294afcb5a42 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pcie.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/windows_server_2012_x64.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-scsi-pci,bus=pcie.0,addr=0x4,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=drive-system-disk,id=system-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=off,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:0d:b1,bus=pcie.0,addr=0x5,bootindex=2 -device virtio-balloon-pci,id=ballooning,bus=pcie.0,addr=0x6 -drive file=/home/my-data-disk.raw,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK2 -device virtio-scsi-pci,bus=pcie.0,addr=0x7,id=scsi1 -device scsi-hd,bus=scsi1.0,drive=drive-data-disk,id=data-disk -readconfig /home/ich9-ehci-uhci.cfg -device usb-tablet,id=input0 -device usb-mouse,id=mouse0 -device usb-kbd,id=kbd0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=2 -drive file=/home/my-usb-storage.qcow2,if=none,id=storage0,media=disk,cache=none,format=qcow2 -device usb-storage,drive=storage0,id=usb-storage0 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/ttyS0,server,nowait -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -spice disable-ticketing,port=5931 -monitor stdio

Comment 2 Sibiao Luo 2013-04-03 03:38:45 UTC
Created attachment 731035 [details]
the device manager for usb-kbd under q35.

Comment 3 Sibiao Luo 2013-04-03 03:39:19 UTC
Created attachment 731036 [details]
the device manager for usb-kbd under pc-i440fx-1.4.

Comment 4 Hai Huang 2013-04-04 13:14:33 UTC
Please reassign and/or dispatch as appropriate. Thanks.

Comment 5 Miki Mishael 2013-12-15 13:09:40 UTC
Created attachment 836929 [details]
Tested usb-kbd under q35.png

I couldn't reproducible the bug, not once.

host info:
kernel - Linux Snarl.daynix 3.10.9-200.fc19.x86_64 #1 SMP Wed Aug 21 19:27:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
qemu-system-x86_64 - v1.6.0 tag.
seabios-rel-1.7.3 tag.

guest info:
windows: win2012 64bit

I have tried with and without the bios (also tried other bios versions).

My command line:

/home/mikim/install_gen/bin/qemu-system-x86_64 \
-M q35 -cpu SandyBridge -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -name sluo-test \
-uuid ed09fa10-6ffe-4811-a42f-0294afcb5a42 -rtc base=localtime,clock=host,driftfix=slew \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pcie.0,addr=0x3 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait \
-device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait \
-device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 \
-drive file=/home/mikim/general/win2012_x64.raw,if=none,id=drive-system-disk,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1 \
-device virtio-scsi-pci,bus=pcie.0,addr=0x4,id=scsi0 \
-device scsi-hd,bus=scsi0.0,drive=drive-system-disk,id=system-disk,bootindex=1 \
-netdev tap,id=hostnet0,vhost=off,script=/home/mikim/general/mgnt-ifup \
-device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:0d:b1,bus=pcie.0,addr=0x5,bootindex=2 \
-device virtio-balloon-pci,id=ballooning,bus=pcie.0,addr=0x6 \
-drive file=/home/mikim/general/test_image.img,if=none,id=drive-data-disk,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK2 \
-device virtio-scsi-pci,bus=pcie.0,addr=0x7,id=scsi1 \
-device scsi-hd,bus=scsi1.0,drive=drive-data-disk,id=data-disk \
-readconfig /home/mikim/general/ich9-ehci-uhci.cfg \
-device usb-tablet,id=input0 \
-device usb-mouse,id=mouse0 \
-device usb-kbd,id=kbd0 \
-chardev spicevmc,name=usbredir,id=usbredirchardev1 \
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0,debug=2 \
-drive file=/home/mikim/general/my-usb-storage.qcow2,if=none,id=storage0,media=disk,cache=none,format=qcow2 \
-device usb-storage,drive=storage0,id=usb-storage0 \
-global PIIX4_PM.disable_s3=0 \
-global PIIX4_PM.disable_s4=0 \
-serial unix:/tmp/ttyS0,server,nowait \
-qmp tcp:0:4444,server,nowait \
-k en-us \
-boot menu=on \
-vnc :1 \
-spice disable-ticketing,port=5931 \
-monitor stdio \
-bios /home/mikim/seabios/out/bios.bin \

Attached diffrun.txt file for diff between my run and bug running the guest.

Although, I have seen his screen capture and there is diff in device manager. please look at the "3" "HID-compliant mouse", I don't have it.

As I said we have the same cmd line so there shouldn't be diff, probably this is his Keyboard.

Comment 6 Miki Mishael 2013-12-15 13:10:33 UTC
Created attachment 836930 [details]
diffrun.txt

Comment 9 Sibiao Luo 2013-12-16 03:08:21 UTC
(In reply to Miki Mishael from comment #5)
> 
> Attached diffrun.txt file for diff between my run and bug running the guest.
> 
> Although, I have seen his screen capture and there is diff in device
> manager. please look at the "3" "HID-compliant mouse", I don't have it.
> 
> As I said we have the same cmd line so there shouldn't be diff, probably
> this is his Keyboard.

Yes, re-tried it that also have no "3" "HID-compliant mouse" now with the same qemu-kvm command line as comment #0, it was very strange.

Device Manager
 Mice and other pointing devices.
  * HID-compliant mouse
  * HID-compliant mouse
  * PS/2 Compatible Mouse

And i tried to switch the three mice type which worked well in guest.
(qemu) info mice 
  Mouse #0: QEMU PS/2 Mouse
  Mouse #2: QEMU HID Mouse
* Mouse #1: QEMU HID Tablet (absolute)

Best Regards,
sluo

Comment 10 Yvugenfi@redhat.com 2013-12-24 13:34:18 UTC
Closing according to comment #9 and comment #5