Description of problem:
Boot a guest with both usb-tablet and usb-mouse, and the guest will use usb tablet. Mouse can get inside and outside guest desktop freely. But after migration to another host, the mouse switches to usb mouse and the mouse point it grabbed.
Version-Release number of selected component (if applicable):
kernel-2.6.32-331.el6.x86_64
qemu-kvm-0.12.1.2-2.327.el6.x86_64
spice-server-0.12.0-1.el6.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Boot guest with both usb tablet and usb mouse.
# /usr/libexec/qemu-kvm ... -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=input0 -device usb-hub,bus=usb.0,port=2,id=hub -device usb-storage,bus=usb.0,port=2.4,drive=drive-usb-2-0,id=usb-2-0,removable=on -drive file=/mnt/usb.qcow2,if=none,id=drive-usb-2-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads -device usb-kbd,id=kbd,port=2.1 -device usb-mouse,id=mouse,port=2.2
2.(qemu) info usb
Device 0.0, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
Device 0.0, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
Device 0.0, Port 2.4, Speed 12 Mb/s, Product QEMU USB MSD
Device 0.0, Port 2.1, Speed 12 Mb/s, Product QEMU USB Keyboard
Device 0.0, Port 2.2, Speed 12 Mb/s, Product QEMU USB Mouse
3.(qemu) info mice
* Mouse #1: QEMU USB Tablet
Mouse #2: QEMU USB Mouse
Mouse #0: QEMU PS/2 Mouse
4. Boot the guest on another host with listening mode
5. Migrate guest to dst host.
6. Check usb mouse after migration.
(qemu) info mice
* Mouse #2: QEMU USB Mouse
Mouse #1: QEMU USB Tablet
Mouse #0: QEMU PS/2 Mouse
Actual results:
USB tablet changes to USB mouse after migration
Expected results:
Still use usb tablet.
Additional info:
Don't add both usb mouse and tablet. If you want a tablet, add a tablet only.
If you have both it isn't predictable which will actually be used, it is pure luck it worked as expected before migration.