Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
If use "# virsh nodedev-create mdev.xml" to create mdev, it will also have two minutes delay for checking the result with "virsh nodedev-list --cap mdev"
[root@kernelqe2 bfu]# cat mdev.xml
<device>
<name>mdev_4c1da20a-7f13-4e01-b42a-d0705ba4ffb6</name>
<path>/sys/devices/vfio_ap/matrix/4c1da20a-7f13-4e01-b42a-d0705ba4ffb6</path>
<parent>ap_matrix</parent>
<driver>
<name>vfio_mdev</name>
</driver>
<capability type='mdev'>
<type id='vfio_ap-passthrough'/>
<attr name="assign_adapter" value="0x02"/>
<attr name="assign_domain" value="0x0011"/>
</capability>
</device>
(In reply to Cornelia Huck from comment #3)
> Does mdevctl print anything sane if you try to list the devices? IOW, is it
> libvirt that chokes on this?
As the additional information in comment1, seems yes, I think libvirt chokes on this.
And as for mdevctl print:
[root@kernelqe2 bfu]# mdevctl list -d --dumpjson
[
{
"0.0.26ab": [
{
"566d63bd-8b33-4323-9f13-5d56155cd668": {
"mdev_type": "fbq1",
"start": "manual"
}
},
{
"254193dd-8ffc-4594-a272-28e35d87071g": {
"mdev_type": "fbq2",
"start": "manual"
}
},
{
"566d63bd-8b33-4323-9f13-5d56155cd669": {
"mdev_type": "fbq1",
"start": "manual"
}
}
],
"matrix": [
{
"fcbc4814-8e59-4620-a817-92c9a7724a2e": {
"mdev_type": "vfio_ap-passthrough",
"start": "manual",
"attrs": [
{
"assign_adapter": "0x02"
},
{
"assign_domain": "0x0011"
},
{
"assign_domain": "0x003a"
},
{
"assign_domain": "0x00ab"
}
]
}
}
]
}
]
Comment 5Boris Fiuczynski (IBM)
2021-07-08 08:55:25 UTC
(In reply to Cornelia Huck from comment #3)
> Does mdevctl print anything sane if you try to list the devices? IOW, is it
> libvirt that chokes on this?
Yes, I think that is caused by libvirt.
1. libvirts mdevctl polling runs into parsing errors as long as an mdev definition with an unknown mdev_type type exists.
I tried it out like this creating an vfio-ccw alike mdev.
# mdevctl list -d --dumpjson
[
{
"0.0.0033": [
{
"e60cef97-3f6b-485e-ac46-0520f9f66ac2": {
"mdev_type": "vfio_ccw-io",
"start": "manual"
}
}
],
"0.0.0034": [
{
"ffffffff-3f6b-485e-ac46-0520f9f66ac2": {
"mdev_type": "type1",
"start": "manual"
}
}
]
}
]
Looking into the journal can I confirm this problem.
Jul 08 09:32:18 t46lp71.lnxne.boe libvirtd[139293]: internal error: Unexpected format for parent device object
Jul 08 09:32:18 t46lp71.lnxne.boe libvirtd[139293]: internal error: failed to query mdevs from mdevctl:
Jul 08 09:32:56 t46lp71.lnxne.boe libvirtd[139293]: internal error: Unexpected format for parent device object
Jul 08 09:32:56 t46lp71.lnxne.boe libvirtd[139293]: internal error: failed to query mdevs from mdevctl:
Jul 08 09:32:56 t46lp71.lnxne.boe libvirtd[139293]: mdevctl failed to updated mediated devices
Jul 08 09:32:57 t46lp71.lnxne.boe libvirtd[139293]: internal error: Unexpected format for parent device object
Jul 08 09:32:57 t46lp71.lnxne.boe libvirtd[139293]: internal error: failed to query mdevs from mdevctl:
Jul 08 09:32:57 t46lp71.lnxne.boe libvirtd[139293]: mdevctl failed to updated mediated devices
2. loading/unloading the vfio_ap device driver causes a long delay until the ap_matrix gets creating/deleting as nodedev object
The device driver is actually loaded and available immediately. When trying this out with libvirt v7.5.0+ I had to wait more than 5 minutes until the ap_matrix nodedev object appeared in the list of objects after loading the vfio_ap device driver.
It looks like the udev event parsing in libvirt gets locked up by the mdevctl polling errors.