Due to the way the hardware works, KVM on ppc64 always requires
memory locking; however, that is not the case for non-KVM ppc64
guests, eg. ppc64 guests that are running on x86_64 with TCG.
Only require memory locking for ppc64 guests if they are using
KVM or, as it's the case for all architectures, they have host
devices assigned using VFIO.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1350772
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];
return true;
}
+ /* ppc64 KVM domains need to lock some memory even when VFIO is not used */
+ if (ARCH_IS_PPC64(def->os.arch) && def->virtType == VIR_DOMAIN_VIRT_KVM)
+ return true;
+
return false;
}