Bug 1759849
Summary: | virsh domcapabilities incorrectly includes usb on s390x | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | smitterl |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
Status: | CLOSED ERRATA | QA Contact: | virt-qe-z |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 8.1 | CC: | cohuck, dzheng, jdenemar, mprivozn, qzhang, rbalakri, smitterl, thuth, virt-maint, yalzhang |
Target Milestone: | rc | Keywords: | Upstream |
Target Release: | 8.3 | ||
Hardware: | s390x | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-6.0.0-17.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-11-04 02:53:03 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
smitterl
2019-10-09 09:19:44 UTC
The base problem probably is that the machine accepts 'usb=on', even though usb is not supported on s390. We may want to make it possible for the machine to disable usb support (it is already possible for things like parallel.) domaincapabilities also returns ... <graphics supported='yes'> <enum name='type'> <value>sdl</value> <value>vnc</value> </enum> </graphics> ... but defining machine fails starting with 'qemu-kvm: -sdl: SDL support is disabled' Talked to Cornelia about this BZ and, while it's nice to get this fixed, our conclusion is that this is low-priority because there's nothing impacted by the fact usb support shows up in virsh domcapabilities (this is informational only). (In reply to Cornelia Huck from comment #1) > The base problem probably is that the machine accepts 'usb=on', even though > usb is not supported on s390. Looking at src/qemu/qemu_capabilities.c in the libvirt sources, it rather seems like this is hard-coded in libvirt: static int virQEMUCapsFillDomainDeviceHostdevCaps(virQEMUCapsPtr qemuCaps, virDomainCapsDeviceHostdevPtr hostdev) { [...] VIR_DOMAIN_CAPS_ENUM_SET(hostdev->subsysType, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI); [...] } I think libvirt should rather check for the availability of a USB host controller before setting the domain capability here, i.e. check for one of these QEMU capabilities: QEMU_CAPS_PIIX3_USB_UHCI, /* -device piix3-usb-uhci */ QEMU_CAPS_PIIX4_USB_UHCI, /* -device piix4-usb-uhci */ QEMU_CAPS_USB_EHCI, /* -device usb-ehci */ QEMU_CAPS_ICH9_USB_EHCI1, /* -device ich9-usb-ehci1 and friends */ QEMU_CAPS_VT82C686B_USB_UHCI, /* -device vt82c686b-usb-uhci */ QEMU_CAPS_PCI_OHCI, /* -device pci-ohci */ QEMU_CAPS_NEC_USB_XHCI, /* -device nec-usb-xhci */ QEMU_CAPS_DEVICE_QEMU_XHCI, /* -device qemu-xhci */ (In reply to smitterl from comment #2) > domaincapabilities also returns > ... > <graphics supported='yes'> > <enum name='type'> > <value>sdl</value> > <value>vnc</value> > </enum> > </graphics> > ... > > but defining machine fails starting with 'qemu-kvm: -sdl: SDL support is > disabled' Concerning the <graphics>, I think libvirt should use the "query-display-options" QMP command of QEMU to find out what graphic backends are available in QEMU (SDL currently seems to be hardcoded there, too) (In reply to Thomas Huth from comment #5) > (In reply to smitterl from comment #2) > > domaincapabilities also returns > > ... > > <graphics supported='yes'> > > <enum name='type'> > > <value>sdl</value> > > <value>vnc</value> > > </enum> > > </graphics> > > ... > > > > but defining machine fails starting with 'qemu-kvm: -sdl: SDL support is > > disabled' > > Concerning the <graphics>, I think libvirt should use the > "query-display-options" QMP command of QEMU to find out what graphic > backends are available in QEMU Ah, scratch that, this QMP command only provides information about the current display option, but does not list the available ones. Not sure whether there is a way to query this information in a proper way at all. Maybe this needs a new QMP command to be defined? Patch proposed here: https://www.redhat.com/archives/libvir-list/2020-January/msg00579.html and pushed upstream as: bfd5f69d60 qemu_capabilities: Do not report USB as subsystem type if it is not available v6.0.0-rc1-16-gbfd5f69d60 (In reply to smitterl from comment #2) > domaincapabilities also returns > ... > <graphics supported='yes'> > <enum name='type'> > <value>sdl</value> > <value>vnc</value> > </enum> > </graphics> > ... > > but defining machine fails starting with 'qemu-kvm: -sdl: SDL support is > disabled' Moved to separate bz https://bugzilla.redhat.com/show_bug.cgi?id=1790902 Verified with version: libvirt-daemon-6.0.0-17.module+el8.3.0+6423+e4cb6418.s390x # virsh domcapabilities --virttype kvm --machine s390-ccw-virtio --arch s390x --emulatorbin /usr/libexec/qemu-kvm && rpm -q libvirt-daemon <domainCapabilities> ... <machine>s390-ccw-virtio-rhel8.2.0</machine> <arch>s390x</arch> ... <devices> ... <hostdev supported='yes'> ... <enum name='subsysType'> <value>pci</value> <value>scsi</value> </enum> ... </devices> ... </domainCapabilities> 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 (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), 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://access.redhat.com/errata/RHSA-2020:4676 |