Bug 1270146

Summary: can't input character into guest without usb-kbd device
Product: Red Hat Enterprise Linux 7 Reporter: mazhang <mazhang>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: knoel, kraxel, mazhang, michen, qzhang, virt-maint, xuma
Target Milestone: rc   
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-12 07:43:37 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:

Description mazhang 2015-10-09 06:07:33 UTC
Description of problem:
can't input in guest without usb-kbd device

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

Host:
kernel-3.10.0-320.el7.ppc64le
qemu-kvm-rhev-2.3.0-28.el7.ppc64le
SLOF-20150313-5.gitc89b0df.el7.noarch

Guest:
RHEL7.2 BE
RHEL-7.2-20151001.0

How reproducible:
100%

Steps to Reproduce:
1.Start qemu-kvm with following command line:
/usr/libexec/qemu-kvm -name RHEL-7.2_BE -machine pseries,accel=kvm,usb=off -m 8192 -realtime mlock=off -smp 8,sockets=2,cores=2,threads=2 \
-rtc base=localtime,clock=host,driftfix=slew \
-monitor stdio \
-boot menu=on \
-device usb-ehci,id=usb,bus=pci.0,addr=0x1 \
-drive file=/home/mazhang/rhel7.2-ppc.qcow2,if=none,id=drive-scsi0-0-0-0,format=qcow2,cache=none,rerror=stop,werror=stop,aio=native \
-device virtio-blk-pci,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bus=pci.0,addr=0x3,bootindex=1 \
-vnc :0 -device VGA,id=video0,vgamem_mb=16,bus=pci.0,addr=0x5 \
-msg timestamp=on \
-netdev tap,id=hostnet0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:c4:e7:93,bus=pci.0,addr=0x6 \
-qmp tcp:0:4448,server,nowait \
-serial unix:/tmp/console0,server,nowait \
-S \
-device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0 \
-chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait \
-device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm0,bus=virtio-serial0.0,id=port1 \
-chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait \
-device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm1,bus=virtio-serial0.0,id=port2 \

Actual results:
After guest boot up, can't input character into guest. 

Expected results:
Can input characters.

Additional info:
1. Append "-device usb-kbd" in command line, qemu-kvm works well.
2. Use the same command line on x86 platform(without usb-kbd) did not hit this problem.

Comment 2 Gerd Hoffmann 2015-10-12 07:43:37 UTC
> can't input in guest without usb-kbd device

Well, you need a keyboard device to send key events to the guest ...

We have usb-kbd and virtio-keyboard-pci, pick one.
The virtio keyboard requires 7.2+ for both guest and host.

> 2. Use the same command line on x86 platform(without usb-kbd) did not hit
> this problem.

x86 machines always have a ps/2 keyboard (and mouse too), so they have a keyboard device even if you don't explicitly add one.  That isn't the case for ppc64(le) and aarch64.