mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: hotplug: Reject VFIO hotplug if setting RLIMIT_MEMLOCK fails
Check the return value of virCommandSetMaxMemLock when hotplugging VFIO PCI hostdevs and reject the hotplug if the memory limit can't be set.
This commit is contained in:
parent
ec90b34acf
commit
baf55e1fa4
@ -1279,7 +1279,10 @@ qemuDomainAttachHostPCIDevice(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
/* setup memory locking limits, that are necessary for VFIO */
|
||||
virProcessSetMaxMemLock(vm->pid, qemuDomainGetMlockLimitBytes(vm->def));
|
||||
if (virProcessSetMaxMemLock(vm->pid,
|
||||
qemuDomainGetMlockLimitBytes(vm->def)) < 0)
|
||||
goto error;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user