Bug 1624735 - libvirt refuses to start a guest with vfio-ccw on s390 because of missing 'display' attribute
Summary: libvirt refuses to start a guest with vfio-ccw on s390 because of missing 'di...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.6
Hardware: s390
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-03 07:40 UTC by Erik Skultety
Modified: 2018-10-30 09:59 UTC (History)
2 users (show)

Fixed In Version: libvirt-4.5.0-8.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1624740 (view as bug list)
Environment:
Last Closed: 2018-10-30 09:59:06 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3113 None None None 2018-10-30 09:59:09 UTC

Description Erik Skultety 2018-09-03 07:40:16 UTC
Description of problem:
libvirt fails to start a guest with an mdev device on s390.

Version-Release number of selected component (if applicable):
libvirt-4.5.0-4.el7

How reproducible:


Steps to Reproduce:
1. define a guest foo with an vfio-ccw mdev

...
<hostdev mode='subsystem' type='mdev' model='vfio-ccw'>
      <source>
        <address uuid='cfbb5f90-0465-4ed2-8949-248c9eeba1ee'/>
      </source>
      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0003'/>
</hostdev>
...

2. start the guest
# virsh start foo

3.

Actual results:
error: unsupported configuration: <hostdev> attribute 'display' is only
supported with model='vfio-pci'

Expected results:
libvirt starts a guest with an mdev on s390 successfully

Additional info:
upstream commit d54e45b6 introduced a new <hostdev> attribute 'display' which is only supported with vfio-pci backends

- the error is kind of confusing on s390 because the definition doesn't even contain the attribute, because libvirt adds it by default, which is wrong with vfio-ccw

Comment 2 Erik Skultety 2018-09-03 07:41:42 UTC
fixed upstream by:
commit d6f97d1338ba9470f7c745fab317d272cde84d38
Refs: v4.7.0-rc2-2-gd6f97d1338
Author:     Farhan Ali <alifm@linux.ibm.com>
AuthorDate: Thu Aug 30 13:07:34 2018 -0400
Commit:     Erik Skultety <eskultet@redhat.com>
CommitDate: Fri Aug 31 14:18:16 2018 +0200

    qemu: mdev: Use vfio-pci 'display' property only with vfio-pci mdevs

    S390 is aware of both vfio-pci and vfio-ccw devices, so
    on S390 the capability QEMU_CAPS_VFIO_PCI_DISPLAY will be
    available. Add an extra check to make sure we only set the
    display to off for vfio-pci mediated devices. Otherwise we
    add display for vfio-ccw device and this breaks vfio-ccw
    device qemu command line.

    Fixes: d54e45b6e conf: Introduce new <hostdev> attribute 'display'
    Signed-off-by: Farhan Ali <alifm@linux.ibm.com>
    Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
    Reviewed-by: Erik Skultety <eskultet@redhat.com>

Comment 6 Dan Zheng 2018-09-06 06:31:05 UTC
Package:
libvirt-4.5.0-8.virtcov.el7.s390x
qemu-kvm-ma-2.12.0-12.el7.s390x
kernel-4.14.0-106.el7a.s390x


Steps:
1. Add below in the guest xml and save
<hostdev mode='subsystem' type='mdev' model='vfio-ccw'>
      <source>
        <address uuid='cfbb5f90-0465-4ed2-8949-248c9eeba1ee'/>
      </source>
</hostdev>

2. Dump guest xml
# virsh dumpxml guest |grep hostdev -A4
    <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-ccw'>
      <source>
        <address uuid='cfbb5f90-0465-4ed2-8949-248c9eeba1ee'/>
      </source>
    </hostdev>

3. Start the guest
# virsh start guest
error: Failed to start domain guest
error: device not found: mediated device 'cfbb5f90-0465-4ed2-8949-248c9eeba1ee' not found


As I do not have mdev device in the beaker machine, so above error messages are as expected.

Comment 8 errata-xmlrpc 2018-10-30 09:59:06 UTC
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://access.redhat.com/errata/RHSA-2018:3113


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