]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Allow forcing VFIO when computing memlock limit
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 26 Sep 2019 11:15:47 +0000 (13:15 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Dec 2019 09:04:44 +0000 (10:04 +0100)
commit6edb4321b2434d212f73484ffbf7dc1d24e933e9
tree96a0218949a32a5d83695239c8146233dfeabc88
parentda27be1b096cfcbc54d7b30379b7a6fb0d2de69d
qemu: Allow forcing VFIO when computing memlock limit

With NVMe disks, one can start a blockjob with a NVMe disk
that is not visible in domain XML (at least right away). Usually,
it's fairly easy to override this limitation of
qemuDomainGetMemLockLimitBytes() - for instance for hostdevs we
temporarily add the device to domain def, let the function
calculate the limit and then remove the device. But it's not so
easy with virStorageSourcePtr - in some cases they don't
necessarily are attached to a disk. And even if they are it's
done later in the process and frankly, I find it too complicated
to be able to use the simple trick we use with hostdevs.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_hotplug.c
tests/qemumemlocktest.c