mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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>
This commit is contained in:
@@ -42,7 +42,7 @@ testCompareMemLock(const void *data)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = virTestCompareToULL(info->memlock, qemuDomainGetMemLockLimitBytes(def));
|
||||
ret = virTestCompareToULL(info->memlock, qemuDomainGetMemLockLimitBytes(def, false));
|
||||
|
||||
cleanup:
|
||||
virDomainDefFree(def);
|
||||
|
||||
Reference in New Issue
Block a user