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.
Description of problem:
Boot VM with two vfio-pci devices, then hot-unplug the second device, qemu monitor will promote "qemu-kvm: Failed to remove group 42 from KVM VFIO device: No such file or directory". For the first one it is ok.
I haven't found the effect yet. Both guest and host work well, the device can be un-pluged successfully when check in guest and in qemu side.
Version-Release number of selected component (if applicable):
qemu: qemu-kvm-rhev-2.10.0-9.el7.x86_64
kernel: kernel-3.10.0-797.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1.Boot VM with two vfio-pci device:
-device vfio-pci,host=04:00.0,id=pf1 \
-device vfio-pci,host=04:00.1,id=pf2 \
2. Hot-unplug pf2, qemu monitor promote "qemu-kvm: Failed to remove group 42 from KVM VFIO device: No such file or directory", then hot-unplug pf1, it isok.
3. If hot-unplug pf1 first, it is ok too. hot-unplug pf2, meet the same problem.
Actual results:
qemu monitor promote "qemu-kvm: Failed to remove group 42 from KVM VFIO device: No such file or directory"
Expected results:
No this message
Additional info:
1. This two devices(04:00.0, 04:00.1) are in different iommu group.
2. It is related with the order in which the device is added. Only hot-unplug the second device have this problem.
3. This is not related with guest, both win2016 and rhel7.5 all have this problem.
4. This message are promoted in hmp monitor, no matter execute "device_del" with hmp or qmp.
5. Test with two devices that have different driver, have the same problem.
-device vfio-pci,host=04:00.0,id=pf1 \ (XL710 nic - i40e driver)
-device vfio-pci,host=83:00.0,id=pf2 \ (BCM57810 nic - bnx2x driver)
6. Test with two BCM57810 nics, it is ok.
-device vfio-pci,host=83:00.0,id=pf1 \
-device vfio-pci,host=83:00.1,id=pf2 \
In my host, this two devices are in same iommu group.
This is indeed a qemu-kvm-rhev bug, a regression was introduced in QEMU 2.10 where additional groups attached to the same container do not get registered with the kvm-vfio device, thus when those devices are removed we can't find the original registration. More worrisome is that if the first device gets removed, KVM might revert to instruction emulation that isn't compatible with IOMMUs with non-coherent DMA. KVMGT could also be affected if the vGPU is not the first device registered as the "set KVM" notifier would not be triggered.
Posted upstream and will try to get in for QEMU 2.11. Eric, I'd appreciate a timely upstream review given how close we are to 2.11 upstream.
Adding regression tag since the result here could be more serious than a spurious warning message.
https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg00774.html
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:1104