]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_process.c: make qemuValidateCpuCount public
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 14 Nov 2018 19:52:04 +0000 (17:52 -0200)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 15 Nov 2018 20:44:33 +0000 (15:44 -0500)
commit9a8e040264cba07d4ad43b91ca4cf72aa4ac1340
tree63b6d88f447f3c25003ea8c457dc840dff130770
parent8aad8432f699d3a876e6651a1b1d63d57e4d9e33
qemu_process.c: make qemuValidateCpuCount public

qemuValidateCpuCount validates the maxCpus value of a domain at
startup time, preventing it to start if the value exceeds a maximum.

This checking is also done at qemu_domain.c, qemuDomainDefValidate.
However, it is done only for x86 (and even then, in a specific
scenario). We want this check to be done for all archs.

To accomplish this, let's first make qemuValidateCpuCount public so
it can be used inside qemuDomainDefValidate. The function was renamed
to qemuProcessValidateCpuCount to be compliant with the other public
methods at qemu_process.h. The method signature was slightly adapted
to fit the const 'def' variable used in qemuDomainDefValidate. This
change has no downside in in its original usage at
qemuProcessStartValidateXML.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_process.c
src/qemu/qemu_process.h