Bug 1264845 - [regression] Guest usb mouse/keyboard could not be used on qemu-kvm-rhev-2.3.0-24.el7.ppc64le
[regression] Guest usb mouse/keyboard could not be used on qemu-kvm-rhev-2.3....
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
ppc64le Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: David Gibson
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-21 07:11 EDT by Gu Nini
Modified: 2015-12-04 11:58 EST (History)
13 users (show)

See Also:
Fixed In Version: qemu-kvm-rhev-2.3.0-25.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-04 11:58:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gu Nini 2015-09-21 07:11:49 EDT
Description of problem:
For power pc host with qemu-kvm-rhev-2.3.0-24.el7.ppc64le, the usb mouse/keyboard could not be used in the guest

Version-Release number of selected component (if applicable):
Host kernel: 3.10.0-316.el7.ppc64le
Qemu-kvm-rhev: qemu-kvm-rhev-2.3.0-24.el7.ppc64le
SLOF: SLOF-20150313-5.gitc89b0df.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Boot up a guest with usb mouse and keyboard:

/usr/libexec/qemu-kvm -name spaprqcow2-0921 -machine pseries,accel=kvm,usb=off -m 3072M ... -device pci-ohci,id=ohci0 -device usb-kbd,id=input0 -device usb-mouse,id=input1 -device usb-tablet,id=input2 ... -vnc 0:06 -msg timestamp=on

2. After the guest boots up, connect to the guest through vncviewer:

# vncviewer 10.16.67.19:06 --AutoSelect=0

3. Check if the mouse and keyboard could be used inside the guest

Actual results:
The mouse and keyboard could not be used inside the guest

Expected results:
The mouse and keyboard should be used inside the guest

Additional info:
1. After change the qemu version to qemu-kvm-rhev-2.3.0-23.el7.ppc64le, no the problem any more
2. The x86_64 guys with qemu version qemu-kvm-rhev-2.3.0-24.el7.x86_64 have not met the problem
Comment 1 David Gibson 2015-09-21 22:56:15 EDT
I can reproduce this.  It happens with qemu-kvm-rhev-2.3.0-24.el7.x86_64 but not with upstream qemu.

What seems to be happening is that the ohci driver in the guest isn't binding to the device, but I'm not sure why yet - there aren't any obvious error messages.

Interestingly SLOF *is* able to see and use the USB device.  But neither BE nor LE Linux guest is.
Comment 2 David Gibson 2015-09-22 02:05:30 EDT
I think I've tracked this down to the patches moving PCI device node creation to qemu.  Specifically we're missing upstream commit 4a7c347 which means the guest isn't getting the class code information it needs to match the OHCI driver to the device.
Comment 3 David Gibson 2015-09-22 02:13:32 EDT
Case for blocker status:
    * This represents a serious regression - USB interfaces (and possibly other PCI devices) won't work in Power guests any more.
    * The fix is small, low-risk and already upstream.

Karen, Miya, if you could add some ACKs to this please.
Comment 4 Xu Han 2015-09-22 06:30:39 EDT
I found PCI devices sequence has been reversed. If there are two or more virtio-blk storages, in this case, guest would assign the low address device
 with a "newer" nodename (e.g. /dev/vdb), and this behavior is different from previous.

2015-09-21 09:27:48: Populating /pci@800000020000000
2015-09-21 09:27:48:                      00 3000 (D) : 1af4 1000    virtio [ net ]
2015-09-21 09:27:48:                      00 2800 (D) : 1af4 1001    virtio [ block ]
2015-09-21 09:27:48:                      00 2000 (D) : 1af4 1001    virtio [ block ]
2015-09-21 09:27:48:                      00 1800 (D) : 106b 003f    serial bus [ usb-ohci ]
2015-09-21 09:27:48:                      00 0000 (D) : 1234 1111
2015-09-21 09:27:48: qemu vga

Is it the same cause with this issue?
Comment 5 David Gibson 2015-09-22 22:40:03 EDT
Xu Han,

Yes the change in device order probably has the same cause.  THe move to qemu DT construction is likely to have changed the order of nodes in the flattened tree, which in turn might affect guest probe order.

However, guests shouldn't generally rely on probe order (that's why mount by UUID is a good idea).  So I'm not sure it's a bug.
Comment 6 David Gibson 2015-09-22 22:48:23 EDT
Xu Han,

Yes the change in device order probably has the same cause.  THe move to qemu DT construction is likely to have changed the order of nodes in the flattened tree, which in turn might affect guest probe order.

However, guests shouldn't generally rely on probe order (that's why mount by UUID is a good idea).  So I'm not sure it's a bug.
Comment 7 Miroslav Rezanina 2015-09-23 09:27:11 EDT
Fix included in qemu-kvm-rhev-2.3.0-25.el7
Comment 8 Gu Nini 2015-09-23 23:17:50 EDT
Have updated to qemu-kvm-rhev-2.3.0-25.el7.ppc64le, for the guest new booted up, usb mouse/keyboard could be used correctly now, so the bug should be verified.

While for the PCI devices sequence reversed issue mentioned in comment 4, we should do more checks.
Comment 12 Qunfang Zhang 2015-09-25 03:25:53 EDT
The original bug has been verified pass in comment 8. And for the pci device order issue in comment 4, it still exists in the latest qemu-kvm-rhev-2.3.0-26. I created a separate bug 1266385, let's move the discussion here. 

So I will set this bug to VERIFIED first.
Comment 14 errata-xmlrpc 2015-12-04 11:58:37 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2546.html

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