mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-26 15:14:42 +00:00
qemu: Fix memory locking limit calculation
For guests that use <memoryBacking><locked>, our only option is to remove the memory locking limit altogether. Partially-resolves: https://bugzilla.redhat.com/1431793
This commit is contained in:
parent
1f7661af8c
commit
7e667664d2
@ -6223,10 +6223,13 @@ qemuDomainGetMemLockLimitBytes(virDomainDefPtr def)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (def->mem.locked) {
|
/* If the guest wants its memory to be locked, we need to raise the memory
|
||||||
memKB = virDomainDefGetMemoryTotal(def) + 1024 * 1024;
|
* locking limit so that the OS will not refuse allocation requests;
|
||||||
goto done;
|
* however, there is no reliable way for us to figure out how much memory
|
||||||
}
|
* the QEMU process will allocate for its own use, so our only way out is
|
||||||
|
* to remove the limit altogether. Use with extreme care */
|
||||||
|
if (def->mem.locked)
|
||||||
|
return VIR_DOMAIN_MEMORY_PARAM_UNLIMITED;
|
||||||
|
|
||||||
if (ARCH_IS_PPC64(def->os.arch) && def->virtType == VIR_DOMAIN_VIRT_KVM) {
|
if (ARCH_IS_PPC64(def->os.arch) && def->virtType == VIR_DOMAIN_VIRT_KVM) {
|
||||||
unsigned long long maxMemory;
|
unsigned long long maxMemory;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user