Bug 1298415

Summary: send key "Ctrl+Alt+Del" to guest will cause "usb-host" device disappear in boot menu
Product: Red Hat Enterprise Linux 6 Reporter: Yanan Fu <yfu>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED NEXTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: ailan, mkenneth, rbalakri, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-17 07:17:06 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 Yanan Fu 2016-01-14 03:01:55 UTC
Description of problem:
boot guest with "usb-host"device,and with "-boot menu=on",send key "Ctrl+Alt+Del" to guest, and enter boot menu with "ESC" or "F12", USB device disappear in boot menu.


Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.482.el6.x86_64
seabios-0.6.1.2-30.el6.x86_64
kernel-2.6.32-595.el6.x86_64

How reproducible:
60%

Steps to Reproduce:
1.boot one guest with "usb-host" device and "-boot menu=on":
   -boot menu=on
   -device usb-ehci,id=ehci \
   -device usb-host,hostbus=3,hostaddr=10,id=hostdev0,bus=ehci.0   \

2.click "Send key"--> "Ctrl+Alt+Del" in remote viewer.
3.after seabois print "Press ESC or F12 for boot menu", press ESE or F12 enter boot menu
4. USB device disappear in boot menu

Actual results:
no usb device in boot menu

Expected results:
usb device should exist in boot menu normally.

Additional info:
when send key "Ctrl+Alt+Del", qemu print "processing error - resetting ehci HC" every times.
when hit this issue, /var/log/message show: 

Jan 14 10:44:30 localhost kernel: Buffer I/O error on device sdc, logical block 1
Jan 14 10:44:30 localhost kernel: Buffer I/O error on device sdc, logical block 1
Jan 14 10:44:30 localhost kernel: Buffer I/O error on device sdc, logical block 1
(/dev/sdc is the usb device when i plug it in host)

CLI:
/usr/libexec/qemu-kvm \
-M pc \
-cpu SandyBridge,enforce \
-m 4G \
-smp 1,cores=1,threads=1,sockets=1,maxcpus=65 \
-nodefaults \
-vga std \
-uuid 162494fb-ae6a-47dd-a040-cb26b497b60a \
-chardev socket,id=seabioslog,path=/tmp/seabiosdebug,server,nowait \
-device isa-debugcon,chardev=seabioslog,iobase=0x402 \
-device sga \
-spice port=5901,disable-ticketing \
-usbdevice tablet \
-monitor stdio \
-S \
-boot menu=on \
-drive id=drive_hd1,if=none,media=disk,file=/root/empty_file1 \
-device ide-drive,id=hd1,drive=drive_hd1,bus=ide.0,unit=0 \
-device usb-ehci,id=ehci \
-device usb-host,hostbus=3,hostaddr=10,id=hostdev0,bus=ehci.0   \

Comment 2 Gerd Hoffmann 2016-02-17 07:17:06 UTC
Reset via Ctrl-Alt-Del doesn't do a full hardware reset on RHEL-6,
which in turn can causes effects like this.  Fixed in RHEL-7, not
easily fixable in the RHEL-6 code base.

Workaround: use "virsh reset $guest" instead.