qemu: Always set locked memory limit for ppc64 domains

Unlike other architectures, ppc64 domains need to lock memory
even when VFIO is not used.

Change qemuDomainRequiresMlock() to reflect this fact.
This commit is contained in:
Andrea Bolognani 2015-11-13 10:58:07 +01:00
parent d269ef165c
commit 16562bbc58

View 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];