]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Set RLIMIT_MEMLOCK when memoryBacking/locked is used
authorJiri Denemark <jdenemar@redhat.com>
Fri, 28 Jun 2013 14:58:03 +0000 (16:58 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 8 Jul 2013 10:35:28 +0000 (12:35 +0200)
If a domain is configured to have all its memory locked, we need to set
RLIMIT_MEMLOCK so that QEMU is actually allowed to lock the memory.

src/qemu/qemu_command.c

index a9aa6702f20f2e18bcc04cfc2ad6c32f2f03fde9..46db28a7a41693bc0d6e17a122b6fb696d083992 100644 (file)
@@ -6795,6 +6795,7 @@ qemuBuildCommandLine(virConnectPtr conn,
         virCommandAddArgFormat(cmd, "mlock=%s",
                                def->mem.locked ? "on" : "off");
     }
+    mlock = def->mem.locked;
 
     virCommandAddArg(cmd, "-smp");
     if (!(smp = qemuBuildSmpArgStr(def, qemuCaps)))