]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainGetHostdevPath: Report /dev/vfio/vfio less frequently
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 9 Feb 2017 13:14:09 +0000 (14:14 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 20 Feb 2017 06:21:59 +0000 (07:21 +0100)
commit1bb787fdc9fd03da88bd5cc918231d0bd38f7570
tree5f9a41191e10cafc7527a4eeebc17a4b32e1eace
parentb8e659aa987117e319521340681c5730c4f0e024
qemuDomainGetHostdevPath: Report /dev/vfio/vfio less frequently

So far, qemuDomainGetHostdevPath has no knowledge of the reasong
it is called and thus reports /dev/vfio/vfio for every VFIO
backed device. This is suboptimal, as we want it to:

a) report /dev/vfio/vfio on every addition or domain startup
b) report /dev/vfio/vfio only on last VFIO device being unplugged

If a domain is being stopped then namespace and CGroup die with
it so no need to worry about that. I mean, even when a domain
that's exiting has more than one VFIO devices assigned to it,
this function does not clean /dev/vfio/vfio in CGroup nor in the
namespace. But that doesn't matter.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
src/qemu/qemu_cgroup.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h