]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: Always set locked memory limit for ppc64 domains
authorAndrea Bolognani <abologna@redhat.com>
Fri, 13 Nov 2015 09:58:07 +0000 (10:58 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 20 Nov 2015 09:25:14 +0000 (10:25 +0100)
Unlike other architectures, ppc64 domains need to lock memory
even when VFIO is not used.

Change qemuDomainRequiresMlock() to reflect this fact.

src/qemu/qemu_domain.c

index f5d15b18864091b605d02a1cfa33b57d80a781e4..0861bfd81165b10b27e8b3db2f2db0c4bd7f20a4 100644 (file)
@@ -3917,8 +3917,9 @@ qemuDomainGetMlockLimitBytes(virDomainDefPtr def)
 /**
  * @def: domain definition
  *
- * Returns ture if the locked memory limit needs to be set or updated due to
- * configuration or passthrough devices.
+ * Returns true if the locked memory limit needs to be set or updated because
+ * of domain configuration, VFIO passthrough devices or architecture-specific
+ * requirements.
  * */
 bool
 qemuDomainRequiresMlock(virDomainDefPtr def)
@@ -3928,6 +3929,10 @@ qemuDomainRequiresMlock(virDomainDefPtr def)
     if (def->mem.locked)
         return true;
 
+    /* ppc64 domains need to lock some memory even when VFIO is not used */
+    if (ARCH_IS_PPC64(def->os.arch))
+        return true;
+
     for (i = 0; i < def->nhostdevs; i++) {
         virDomainHostdevDefPtr dev = def->hostdevs[i];