Bug 1411297

Summary: [RFE] Allow osinfo USB controller selection based on machine type (i440fx/q35)
Product: [oVirt] ovirt-engine Reporter: Martin Polednik <mpoledni>
Component: BLL.VirtAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: medium    
Version: futureCC: bugs, mavital, michal.skrivanek, mtessun, nsimsolo, smelamud, tjelinek
Target Milestone: ovirt-4.3.0Keywords: FutureFeature
Target Release: ---Flags: rule-engine: ovirt-4.3+
mavital: testing_plan_complete?
mtessun: planning_ack+
michal.skrivanek: devel_ack+
mavital: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-13 07:42:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1527860    

Description Martin Polednik 2017-01-09 11:54:55 UTC
Description of problem:
Bug 1373223 was resolved by implementing a USB controller selection via osinfo. One of the parts that is missing to fully utilize this functionality in future is machine type awareness - that is, q35 requires different controller than i440fx in some cases (e.g. we default to piix3-uhci on both machine types while q35 should use nec-xhci).

Comment 1 Martin Polednik 2017-01-09 12:24:59 UTC
My idea of the feature is similar to how q35 cdrom is implemented:

os.other.devices.cdInterface.value = ide,q35/sata

Expected format of USB in osinfo:

os.other.devices.usb.controller.value = piix3-uhci,q35/nec-xhci

Comment 5 Nisim Simsolo 2019-01-07 12:59:52 UTC
What is the expected behaviour when using i440fx or Q35 custom emulated machine?
Currently I see the same controllers for i440fx or Q35:
RHEL 7.6 VM with Q35:

    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x2'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x1'/>
    </controller>

RHEL 7.6 VM with i440fx:

    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
    </controller>

Comment 6 Michal Skrivanek 2019-01-17 14:19:38 UTC
you're right. It should be fixed now by https://gerrit.ovirt.org/#/c/96611/ and you should see 1 XHCI now instead

Comment 7 Nisim Simsolo 2019-02-11 14:59:03 UTC
Verification version: 
ovirt-engine-4.3.0.5-0.0.master.20190207124642.git415c7e8.el7
vdsm-4.30.8-58.git60c5a6d.el7.x86_64
qemu-kvm-ev-2.12.0-18.el7_6.3.1.x86_64
libvirt-client-4.5.0-10.el7_6.4.x86_64

Polarion test case added to external trackers.

Comment 8 Sandro Bonazzola 2019-02-13 07:42:59 UTC
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.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.