Bug 1489670 - Hot-unplugging a vhost network device leaks references to VFIOPCIDevice's
Summary: Hot-unplugging a vhost network device leaks references to VFIOPCIDevice's
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.3
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Alex Williamson
QA Contact: Yanan Fu
URL:
Whiteboard:
Depends On:
Blocks: 1490742
TreeView+ depends on / blocked
 
Reported: 2017-09-08 05:42 UTC by Sergio Lopez
Modified: 2018-04-11 00:33 UTC (History)
16 users (show)

Fixed In Version: qemu-kvm-rhev-2.10.0-2.el7
Doc Type: Bug Fix
Doc Text:
Hot-unplugging Virtual Function I/O (VFIO) devices previously failed when performed after hot-unplugging a vhost network device. This update fixes the underlying code, and the VFIO device is unplugged correctly in the described circumstances.
Clone Of:
: 1490742 (view as bug list)
Environment:
Last Closed: 2018-04-11 00:33:01 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1104 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2018-04-10 22:54:38 UTC
Red Hat Bugzilla 1371930 None CLOSED i40e: "x-req" can not work normally when unbind PF form host or unload PF's driver 2019-09-02 07:06:44 UTC

Description Sergio Lopez 2017-09-08 05:42:55 UTC
Hot-unplugging a vhost network device leaks references to VFIOPCIDevice's. This causes that, when trying to hot-unplug one of those VFIO devices, QEMU can't finalize it properly because the references never reach 0.

So far, we've identified the following scenarios (100% reproducible):

---
 1. Start a VM with both a VIRTIO network device and a VFIO hostdev.
 2. Hot-unplug the VIRTIO device.
 3. Hot-unplug the VFIO -> QEMU can't finalize the device: ref=2
---
 1. Start a VM with just a VFIO hostdev.
 2. Hot-plug the VIRTIO device.
 3. Hot-unplug the VFIO -> QEMU can't finalize the device: ref=2
---
 1. Start a VM with just a VFIO hostdev.
 2. Hot-plug the VIRTIO device.
 3. Hot-unplug the VIRTIO device.
 4. Hot-unplug the VFIO -> QEMU can't finalize the device: ref=2
---

There's a patch for this posted in QEMU's mailing list:

 - http://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg01787.html

Comment 16 Miroslav Rezanina 2017-10-13 10:26:23 UTC
Fix included in qemu-kvm-rhev-2.10.0-2.el7

Comment 20 errata-xmlrpc 2018-04-11 00:33:01 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:1104


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