Bug 1715393 - [Q35] Disabling and re-enabling SPICE USB creates a USB2.0 controller instead of xhci
Summary: [Q35] Disabling and re-enabling SPICE USB creates a USB2.0 controller instea...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.3.3.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.4.0
: ---
Assignee: Steven Rosenberg
QA Contact: Nisim Simsolo
URL:
Whiteboard:
: 1716258 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-30 09:00 UTC by Meina Li
Modified: 2020-08-02 13:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, if you changed a virtual machine's *BIOS Type* chipset from one of the *Q35* options to *Cluster default* or visa versa while *USB Policy* or *USB Support* was *Enabled*, the change did not update the USB controller to the correct setting. The current release fixes this issue. The same actions update the USB controller correctly.
Clone Of:
Environment:
Last Closed: 2020-05-20 20:00:35 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 100522 0 master MERGED engine: Reset the USB controller for chipset delta 2020-10-15 16:26:39 UTC

Description Meina Li 2019-05-30 09:00:44 UTC
Description of problem:
As we known, Red Hat Virtualization now expects that when a BIOS type using the Q35 chipset is chosen, and USB is enabled, that the USB controller will be qemu-xhci. But it's USB2.0 controller when we create a q35 vm with USB is enabled.


Version-Release number of selected component (if applicable):
RHV server:
rhvm-4.3.3.7-0.1.el7.noarch

RHV host:
vdsm-4.30.15-1.el7ev.x86_64
qemu-kvm-rhev-2.12.0-28.el7.x86_64
libvirt-4.5.0-17.el7.x86_64
kernel-3.10.0-1048.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a q35 vm with USB enable in spice console.
2. Check the usb controller in vm device. 
3. Edit the usb support to disable and enable in turn and restart vm.

Actual results:
In step2: the usb controller is ich9-ehci1+ich9-uhci1..3(usb2.0)
In step3: the usb controller is not stable with ich9-ehci1 and qemu-xhci

Expected results:
When USB is disable, the controller is piix3-uhci; when USB is enable, the controller is qemu-xhci.

Additional info:

Comment 1 Ryan Barry 2019-05-31 01:40:01 UTC
Looks like an edge case of https://bugzilla.redhat.com/show_bug.cgi?id=1527860 which needs additional logic when the box is checked and unchecked

Comment 2 Steven Rosenberg 2019-06-03 09:27:01 UTC
As per the original issue:

https://bugzilla.redhat.com/show_bug.cgi?id=1527860

Whose title is: Q35: change piix3-usb controller (USB1) to qemu-xhci controller (USB3) 

The usb controller shall be qemu-xhci when the Bios Type is Q35 and piix3-uhci otherwise (when set to default).

Q35 will only work with qemu-xhci so it is the Bios Type that sets the model accordingly and not whether the USB is enabled or disabled.

A disabled USB with Bios Type Q35 should still have a qemu-xhci model.

Please confirm.

Comment 3 Ryan Barry 2019-06-03 09:33:06 UTC
Have you tested the steps in comment#1? The reproducer seems very clear. We don't have logs,but it's an easy check

Create a Q35 VM. Disable USB support. Re-enable it. See what comes out (check the console table, too)

Comment 4 Steven Rosenberg 2019-06-03 10:36:20 UTC
(In reply to Ryan Barry from comment #3)
> Have you tested the steps in comment#1? The reproducer seems very clear. We
> don't have logs,but it's an easy check
> 
> Create a Q35 VM. Disable USB support. Re-enable it. See what comes out
> (check the console table, too)

The expected results is not correct. The Bios Type controls the model, not the enable/disable flag. Also setting the Bios Type to Q35 does not result in a ich9-ehci1+ich9-uhci1..3 controller, only when setting the Default.

disabling and re-enabling does not result in ich9-ehci1 and qemu-xhci.

There is however an issue with changing the Bios Type from Q35 to default or visa versa when the USB is enabled. But that is not what the reproducer is reporting. 

Please confirm that changing the controller is dependent upon the Bios Type, not the USB enabled/disabled flag.

Comment 5 Nisim Simsolo 2019-06-04 08:57:10 UTC
(In reply to Steven Rosenberg from comment #4)
IMO, the expected results in this bug description are incorrect. When using Q35 chipset, for both cases (USB enabled/disabled) the controller type should be QEMU XHCI.
I did some tests of it using ovirt-engine-4.4.0-0.0.master.20190602135708.gitd0fe1bf.el7 build, 
Neither of the next cases are changing USB controller type to piix3-uhci (lsusb command is listing USB 2.0 because it's a dual bus architecture for supporting backward compatibility):

1. Running VM with USB support enabled:
[nsimsolo@vm-94-186 ~]$ lsusb 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[nsimsolo@vm-94-186 ~]$ lspci -nnk | grep -A 2 -i usb
04:00.0 USB controller [0c03]: Red Hat, Inc. QEMU XHCI Host Controller [1b36:000d] (rev 01)
	Subsystem: Red Hat, Inc. Device [1af4:1100]
	Kernel driver in use: xhci_hcd
[nsimsolo@vm-94-186 ~]$ 

2. Disabling USB support -> clicking OK, enabling USB support -> clicking OK and rebooting the VM:
[nsimsolo@vm-94-186 ~]$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[nsimsolo@vm-94-186 ~]$ lspci -nnk | grep -A 2 -i usb
04:00.0 USB controller [0c03]: Red Hat, Inc. QEMU XHCI Host Controller [1b36:000d] (rev 01)
	Subsystem: Red Hat, Inc. Device [1af4:1100]
	Kernel driver in use: xhci_hcd
[nsimsolo@vm-94-186 ~]$ 

3. Disabling USB support -> rebooting VM:
[nsimsolo@vm-94-186 ~]$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[nsimsolo@vm-94-186 ~]$ lspci -nnk | grep -A 2 -i usb
04:00.0 USB controller [0c03]: Red Hat, Inc. QEMU XHCI Host Controller [1b36:000d] (rev 01)
	Subsystem: Red Hat, Inc. Device [1af4:1100]
	Kernel driver in use: xhci_hcd
[nsimsolo@vm-94-186 ~]$

4. Powering off -> running VM while USB support is still disabled: 
[nsimsolo@vm-94-186 ~]$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[nsimsolo@vm-94-186 ~]$ lspci -nnk | grep -A 2 -i usb
04:00.0 USB controller [0c03]: Red Hat, Inc. QEMU XHCI Host Controller [1b36:000d] (rev 01)
	Subsystem: Red Hat, Inc. Device [1af4:1100]
	Kernel driver in use: xhci_hcd
[nsimsolo@vm-94-186 ~]

Comment 6 Steven Rosenberg 2019-06-04 12:59:30 UTC
Notes to QE: Though we did not simulate this issue, changing the BIOS Type from Q35 to the Default or Visa Versa when the USB Policy is and stays enabled, did not modify the USB Controller which is an issue.

Therefore a fix was made for this issue as per https://bugzilla.redhat.com/show_bug.cgi?id=1715393#c4

Comment 7 Steven Rosenberg 2019-07-23 07:44:03 UTC
*** Bug 1716258 has been marked as a duplicate of this bug. ***

Comment 8 Nisim Simsolo 2020-03-18 07:55:05 UTC
Verification builds: 
ovirt-engine-4.4.0-0.25.master.el8ev.noarch
vdsm-4.40.5-1.el8ev.x86_64
qemu-kvm-4.2.0-13.module+el8.2.0+5898+fb4bceae.x86_64
libvirt-daemon-6.0.0-10.module+el8.2.0+5984+dce93708.x86_64

Verification scenario:
1. Run VM with Q35 BIOS and USB support enabled
2. Disable USB support and reboot the VM
3. Enable USB support and reboot the VM
4. Disable USB support and poweroff -> run VM
4. Enable USB support and poweroff -> run VM

Expected results for all steps are:
[root@localhost ~]# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root@localhost ~]# lspci -nnk | grep -i usb -A 2
02:00.0 USB controller [0c03]: Red Hat, Inc. QEMU XHCI Host Controller [1b36:000d] (rev 01)
	Subsystem: Red Hat, Inc. Device [1af4:1100]
	Kernel driver in use: xhci_hcd
[root@localhost ~]#

Comment 9 Sandro Bonazzola 2020-05-20 20:00:35 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

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


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