[PATCH v2 14/15] qemu_validate: Check if QEMU's capable of setting main loop pool size

Peter Krempa pkrempa at redhat.com
Tue Jun 7 15:01:13 UTC 2022


On Tue, Jun 07, 2022 at 14:52:58 +0200, Michal Privoznik wrote:
> Since the main-loop and iothread classes are derived from the
> same class (EventLoopBaseClass) we don't need new capability and
> can use QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX directly to check
> whether QEMU's capable of setting worker pool size.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/qemu/qemu_validate.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
> index 7d11ae2c92..c2495fb6b8 100644
> --- a/src/qemu/qemu_validate.c
> +++ b/src/qemu/qemu_validate.c
> @@ -401,6 +401,15 @@ qemuValidateDomainDefIOThreads(const virDomainDef *def,
>          }
>      }
>  
> +    if (def->defaultIOThread &&
> +        ((def->defaultIOThread->thread_pool_min >= 0 ||
> +          def->defaultIOThread->thread_pool_max >= 0) &&
> +         !virQEMUCapsGet(qemuCaps, QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX))) {
> +        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> +                       _("pool_min and pool_max is not supported by this QEMU binary"));

Old field names in the error message. Also same problem as with regular
iothread pool sizes in regards to max being less than min.

Reviewed-by: Peter Krempa <pkrempa at redhat.com>


More information about the libvir-list mailing list