]> xenbits.xensource.com Git - libvirt.git/commitdiff
Revert "qemu: Forbid <memoryBacking><locked> without <memtune><hard_limit>"
authorAndrea Bolognani <abologna@redhat.com>
Thu, 16 Mar 2017 17:23:56 +0000 (18:23 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 28 Mar 2017 08:44:25 +0000 (10:44 +0200)
This reverts commit c2e60ad0e5124482942164e5fec088157f5e716a.

Turns out this check is excessively strict: there are ways
other than <memtune><hard_limit> to raise the memory locking
limit for QEMU processes, one prominent example being
tweaking /etc/security/limits.conf.

Partially-resolves: https://bugzilla.redhat.com/1431793

src/qemu/qemu_domain.c
tests/qemuxml2argvdata/qemuxml2argv-mlock-on.xml

index f9726636b4ede70616f4a631d90fddcd726d32e6..8659b861d83a59dbb458cc1524f15269b29177f9 100644 (file)
@@ -2922,16 +2922,6 @@ qemuDomainDefValidate(const virDomainDef *def,
         }
     }
 
-    /* Memory locking can only work properly if the memory locking limit
-     * for the QEMU process has been raised appropriately: the default one
-     * is extrememly low, so there's no way the guest will fit in there */
-    if (def->mem.locked && !virMemoryLimitIsSet(def->mem.hard_limit)) {
-        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("Setting <memoryBacking><locked> requires "
-                         "<memtune><hard_limit> to be set as well"));
-        goto cleanup;
-    }
-
     if (qemuDomainDefValidateVideo(def) < 0)
         goto cleanup;
 
index 20466637433fc14bfd78eacc6de14c5cf1515c59..20a5eaa71f341fc290d52c5dcbfab089e4191eb2 100644 (file)
@@ -3,9 +3,6 @@
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>219136</memory>
   <currentMemory unit='KiB'>219136</currentMemory>
-  <memtune>
-    <hard_limit unit='KiB'>256000</hard_limit>
-  </memtune>
   <memoryBacking>
     <locked/>
   </memoryBacking>