]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Take NVMe disks into account when calculating memlock limit
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 25 Jun 2019 13:36:44 +0000 (15:36 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Dec 2019 09:04:43 +0000 (10:04 +0100)
commitd3f06dcdb5a475a6e97fa78f23b3adf845dbe1cf
tree0614be45381c42c0af5c94046364ded409acb610
parent8943ca11b2ed8c4d027410637ba0425c6bf0646e
qemu: Take NVMe disks into account when calculating memlock limit

We have this beautiful function that does crystal ball
divination. The function is named
qemuDomainGetMemLockLimitBytes() and it calculates the upper
limit of how much locked memory is given guest going to need. The
function bases its guess on devices defined for a domain. For
instance, if there is a VFIO hostdev defined then it adds 1GiB to
the guessed maximum. Since NVMe disks are pretty much VFIO
hostdevs (but not quite), we have to do the same sorcery.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
ACKed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
src/qemu/qemu_domain.c