mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
parent
d269ef165c
commit
16562bbc58
@ -3917,8 +3917,9 @@ qemuDomainGetMlockLimitBytes(virDomainDefPtr def)
|
|||||||
/**
|
/**
|
||||||
* @def: domain definition
|
* @def: domain definition
|
||||||
*
|
*
|
||||||
* Returns ture if the locked memory limit needs to be set or updated due to
|
* Returns true if the locked memory limit needs to be set or updated because
|
||||||
* configuration or passthrough devices.
|
* of domain configuration, VFIO passthrough devices or architecture-specific
|
||||||
|
* requirements.
|
||||||
* */
|
* */
|
||||||
bool
|
bool
|
||||||
qemuDomainRequiresMlock(virDomainDefPtr def)
|
qemuDomainRequiresMlock(virDomainDefPtr def)
|
||||||
@ -3928,6 +3929,10 @@ qemuDomainRequiresMlock(virDomainDefPtr def)
|
|||||||
if (def->mem.locked)
|
if (def->mem.locked)
|
||||||
return true;
|
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++) {
|
for (i = 0; i < def->nhostdevs; i++) {
|
||||||
virDomainHostdevDefPtr dev = def->hostdevs[i];
|
virDomainHostdevDefPtr dev = def->hostdevs[i];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user