mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-25 12:40:08 +00:00
ee4c112846
vhost registers a MemoryListener where it adds and removes references
to MemoryRegions as the MemoryRegionSections pass through. The
region_add callback is invoked for each existing section when the
MemoryListener is registered, but unregistering the MemoryListener
performs no reciprocal region_del callback. It's therefore the
owner of the MemoryListener's responsibility to cleanup any persistent
changes, such as these memory references, after unregistering.
The consequence of this bug is that if we have both a vhost device
and a vfio device, the vhost device will reference any mmap'd MMIO of
the vfio device via this MemoryListener. If the vhost device is then
removed, those references remain outstanding. If we then attempt to
remove the vfio device, it never gets finalized and the only way to
release the kernel file descriptors is to terminate the QEMU process.
Fixes:
|
||
---|---|---|
.. | ||
Makefile.objs | ||
trace-events | ||
vhost-backend.c | ||
vhost-stub.c | ||
vhost-user.c | ||
vhost-vsock.c | ||
vhost.c | ||
virtio-balloon.c | ||
virtio-bus.c | ||
virtio-crypto-pci.c | ||
virtio-crypto.c | ||
virtio-mmio.c | ||
virtio-pci.c | ||
virtio-pci.h | ||
virtio-rng.c | ||
virtio.c |