Bug 1373223 - Use nec-xhci USB controller by default on ppc64
Summary: Use nec-xhci USB controller by default on ppc64
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: ---
Hardware: ppc64le
OS: Linux
high
medium
Target Milestone: ovirt-4.1.0-rc
: ---
Assignee: jniederm
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks: 1299681 RHV4.1PPC 1415048
TreeView+ depends on / blocked
 
Reported: 2016-09-05 14:13 UTC by Andrea Bolognani
Modified: 2017-03-07 02:16 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-02-15 14:51:26 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
michal.skrivanek: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 68399 0 master MERGED core: USB controller in osinfo 2016-12-16 06:56:16 UTC
oVirt gerrit 68400 0 master MERGED core: Configurable USB controllers 2016-12-16 06:56:12 UTC
oVirt gerrit 68617 0 master MERGED core: Default USB controller models 2016-12-21 12:56:09 UTC
oVirt gerrit 68667 0 ovirt-engine-4.0 MERGED core: USB controller in osinfo 2016-12-25 12:11:18 UTC
oVirt gerrit 68668 0 ovirt-engine-4.0 MERGED core: Configurable USB controllers 2016-12-25 12:11:14 UTC
oVirt gerrit 68669 0 ovirt-engine-4.0 MERGED core: Default USB controller models 2016-12-25 12:11:23 UTC
oVirt gerrit 68731 0 master MERGED core: Fix of NPE in VmDeviceUtils#getUsbControllerModel 2016-12-19 20:16:46 UTC
oVirt gerrit 68747 0 ovirt-engine-4.1 MERGED core: Fix of NPE in VmDeviceUtils#getUsbControllerModel 2016-12-20 20:01:26 UTC
oVirt gerrit 68748 0 ovirt-engine-4.1 MERGED core: Default USB controller models 2016-12-20 20:01:23 UTC
oVirt gerrit 68923 0 None None None 2016-12-21 15:39:30 UTC
oVirt gerrit 68974 0 ovirt-engine-4.1 MERGED core: change the default usb model 2016-12-25 08:39:40 UTC
oVirt gerrit 68975 0 ovirt-engine-4.0 MERGED core: change the default usb model 2016-12-25 14:03:20 UTC

Description Andrea Bolognani 2016-09-05 14:13:18 UTC
libvirt currently defaults to pci-ohci on ppc64.

However, this USB controller has some issues (see Bug 1212275)
that are unlikely to ever be fixed; moreover nec-xhci is USB3
as opposed to USB2, which should give better performance anyway.

QEMU has already started using nec-xhci (see Bug 1284333)
because of these reasons.

libvirt, on the other hand, can't change its default due to
the fact that up until very recently the USB controller model
was not formatted in the guest configuration.

oVirt should use nec-xhci by default for new ppc64 guests.

Bug 1373184 has already been filed for virt-manager and
related tools.

Comment 1 Martin Polednik 2016-09-12 09:40:02 UTC
After thinking about the "bug", I think ovirt-engine is the proper place where we should add the controller. All we need is engine to send

{'device': 'usb', 'model': 'nec-xhci', 'type': 'controller'}

for ppc64le guests as VDSM has all the machinery to build the XML.

Comment 2 jniederm 2016-09-15 12:43:18 UTC
Final solution is still being discussed, decreasing priority.

Comment 3 jniederm 2016-10-05 13:17:35 UTC
... not any more

Comment 4 Sharon Gratch 2016-11-24 13:14:27 UTC
Please note that this is relevant also for Bug 1381184 (headless VM RFE):
In case of a headless VM & the if the serial console is disabled- the usb controller should not be added while running this VM. 
Currently is is not supported by libvirt and usb device is always added while starting a VM, eventhough the list sent by engine doesn't include the usb device.

Comment 5 Andrea Bolognani 2016-11-24 14:09:26 UTC
(In reply to Sharon Gratch from comment #4)
> Please note that this is relevant also for Bug 1381184 (headless VM RFE):
> In case of a headless VM & the if the serial console is disabled-

Why would you want to have neither graphical nor serial
console? Surely the latter should be present for headless
guests.

> the usb
> controller should not be added while running this VM. 
> Currently is is not supported by libvirt and usb device is always added
> while starting a VM, eventhough the list sent by engine doesn't include the
> usb device.

You can simply include

  <controller type='usb' model='none'/>

in the guest XML to opt out of the default USB controller.

Comment 6 jniederm 2016-12-09 15:27:03 UTC
I suggest following solution:

If (VM dialog > Console > USB Support == Enabled)
    original behavior remains (1 quaterion of controllers ("ich9-uhci3", "ich9-ehci1",
    "ich9-uhci1", "ich9-uhci2") per each started sextuple of required slots)
otherwise
    one controller as defined in osinfo.properties per each started sextuple of required slots

Comment 7 Michal Skrivanek 2016-12-15 12:48:49 UTC
this is required for 4.0 on RHEL 7.3 as well, otherwise bug 1299681 won't get fixed

Comment 8 Andrea Bolognani 2017-01-13 13:54:38 UTC
On Mon, 2017-01-09 at 15:38 +0000, bugzilla wrote:
> --- Doc Text *updated* by jniederm ---
> If SPICE USB redirection is enabled (VM-like dialog > Console > USB Support), the behavior remains unchanged: each VM has a quadruple of usb controllers: ich9-ehci1, ich9-uhci1,ich9-uhci2, ich9-uhci3.
> If SPICE USB redirection is disabled, then VM has newly USB controller as specified in osinfo-defaults.properties configuration file, i.e. it is configurable per guest operating system and effective cluster version. Previously no usb controller was send to libvirt and libvirt created a default usb controller.

Why does the behavior change based on whether or not SPICE
USB redirection is enabled? Is that feature only available
with ICH9 controllers?

> Default for all intel (x86, x86-64) operating systems is "piix3-uhci", for ppc64 systems it is "nec-xhci".

Why piix3-uhci instead of ich9-* for x86 guests?

Moreover, x86/q35 guests should default to nex-xhci just
like ppc64/pseries guests. (And, just for the record, so
should aarch64/virt guests, but I understand aarch64 might
be just considered out of scope.)

-- 
Andrea Bolognani / Red Hat / Virtualization

Comment 9 jniederm 2017-01-17 17:58:37 UTC
(In reply to Andrea Bolognani from comment #8)
> On Mon, 2017-01-09 at 15:38 +0000, bugzilla wrote:
> > --- Doc Text *updated* by jniederm ---
> > If SPICE USB redirection is enabled (VM-like dialog > Console > USB Support), the behavior remains unchanged: each VM has a quadruple of usb controllers: ich9-ehci1, ich9-uhci1,ich9-uhci2, ich9-uhci3.
> > If SPICE USB redirection is disabled, then VM has newly USB controller as specified in osinfo-defaults.properties configuration file, i.e. it is configurable per guest operating system and effective cluster version. Previously no usb controller was send to libvirt and libvirt created a default usb controller.
> 
> Why does the behavior change based on whether or not SPICE
> USB redirection is enabled? Is that feature only available
> with ICH9 controllers?

remove-viewer doesn't support USB 3 redirection yet, it may come with RHEL 7.4. This way a well tested set of spice compatible controllers remained untouched.

> 
> > Default for all intel (x86, x86-64) operating systems is "piix3-uhci", for ppc64 systems it is "nec-xhci".
> 
> Why piix3-uhci instead of ich9-* for x86 guests?

From commit message of https://gerrit.ovirt.org/#/c/68923/:
"piix3-uhci that as opposed to ich9-ehci1 is supposed to work properly with usb devices that require USB-1.0 like smartcard."

> 
> Moreover, x86/q35 guests should default to nex-xhci just
> like ppc64/pseries guests. (And, just for the record, so
> should aarch64/virt guests, but I understand aarch64 might
> be just considered out of scope.)
> 
> -- 
> Andrea Bolognani / Red Hat / Virtualization

Comment 10 Andrea Bolognani 2017-01-19 15:05:20 UTC
(In reply to jniederm from comment #9)
> > Why does the behavior change based on whether or not SPICE
> > USB redirection is enabled? Is that feature only available
> > with ICH9 controllers?
> 
> remove-viewer doesn't support USB 3 redirection yet, it may come with RHEL
> 7.4. This way a well tested set of spice compatible controllers remained
> untouched.
> 
> > > Default for all intel (x86, x86-64) operating systems is "piix3-uhci", for ppc64 systems it is "nec-xhci".
> > 
> > Why piix3-uhci instead of ich9-* for x86 guests?
> 
> From commit message of https://gerrit.ovirt.org/#/c/68923/:
> "piix3-uhci that as opposed to ich9-ehci1 is supposed to work properly with
> usb devices that require USB-1.0 like smartcard."

Okay, so:

  * x86
    - no SPICE -> piix3-uhci
      + you're limited to USB 1.1 but you can have smartcards
    - SPICE -> ich9-ehci1
      + you have USB 2.0 but give up smartcard support
  * non-x86
    - nec-xhci
      + SPICE is not supported

IIUC that means q35 guests will be stuck with USB 2.0 as
well, which is too bad...

Hopefully SPICE will start supporting USB 3.0 (and non-x86
architectures) soon! :)

Comment 11 jniederm 2017-01-19 20:55:24 UTC
(In reply to Andrea Bolognani from comment #10)
> (In reply to jniederm from comment #9)
> > > Why does the behavior change based on whether or not SPICE
> > > USB redirection is enabled? Is that feature only available
> > > with ICH9 controllers?
> > 
> > remove-viewer doesn't support USB 3 redirection yet, it may come with RHEL
> > 7.4. This way a well tested set of spice compatible controllers remained
> > untouched.
> > 
> > > > Default for all intel (x86, x86-64) operating systems is "piix3-uhci", for ppc64 systems it is "nec-xhci".
> > > 
> > > Why piix3-uhci instead of ich9-* for x86 guests?
> > 
> > From commit message of https://gerrit.ovirt.org/#/c/68923/:
> > "piix3-uhci that as opposed to ich9-ehci1 is supposed to work properly with
> > usb devices that require USB-1.0 like smartcard."
> 
> Okay, so:
> 
>   * x86
>     - no SPICE -> piix3-uhci
>       + you're limited to USB 1.1 but you can have smartcards
>     - SPICE -> ich9-ehci1
>       + you have USB 2.0 but give up smartcard support
>   * non-x86
>     - nec-xhci
>       + SPICE is not supported
Yes. I just want to add that non-SPICE branches in tree above shows defaults. User can choose arbitrary controller.

> 
> IIUC that means q35 guests will be stuck with USB 2.0 as
> well, which is too bad...
> 
> Hopefully SPICE will start supporting USB 3.0 (and non-x86
> architectures) soon! :)

Comment 12 Sandro Bonazzola 2017-01-25 07:55:45 UTC
4.0.6 has been the last oVirt 4.0 release, please re-target this bug.

Comment 13 sefi litmanovich 2017-02-05 12:42:41 UTC
Verified with two engines, one with x86_64 DC and one with PPC64 DC, rhevm-4.1.0.4-0.1.el7.noarch and rhevm-4.1.0.2-0.1.el7.noarch respectively.
Verified that on PPC the default usb set in osinfo-defaults.properties is nec-xhci and that it's defined well in vm's xml.
Checked the that the default for x86 is 'piix3-uhci' when usb support is disabled, and 4 controllers ich9-ehci1, ich9-uhci1,ich9-uhci2, ich9-uhci3 when usb support is enabled for spice console.
Verified that the changing the value in osinfo-defaults.properties changes the default controller type successfully.


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