From nobody Mon Feb 9 09:07:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654606406; cv=none; d=zohomail.com; s=zohoarc; b=IC9G0zvW+CMnkpWEHUiDrt4c0u/Jx0eY4vehtRLiJ9siyHLgTIHwOBp6wcNroaoEDyokHc8giyQauiFPDWRHbmXslqIitewv9VFe8J48hqiR1NCMI7GhLXfX2kU9dhntY+9lCeZFs5OEiANe6g6jD9Ue94FzerHeEaXT3ipc4rw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654606406; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=G4XRbJdtfuPUaIqXqH0sQKicSOWUTPumDONt0qNkw/k=; b=iIocylx8edItJCiRL2rZpITkinJez1ATd0h1ZVhljsTcn3v9C9s+wqFPUYjos3eEeJx/vgmJWZ5Z//IwhtTDXNgTC8U4tshu1sk7HTGDMjKpldy4CNDo24RYVWUJodYxhBBE/tVzJb2NK07bXkGtSKcUQz9Su3Zy16Dnus9P79Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1654606406562192.26683377639677; Tue, 7 Jun 2022 05:53:26 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-251-dOf9vzwmM5Gc-SLh62m0wg-1; Tue, 07 Jun 2022 08:53:19 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C31989C96B; Tue, 7 Jun 2022 12:53:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D4F01121315; Tue, 7 Jun 2022 12:53:15 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E08091947B94; Tue, 7 Jun 2022 12:53:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 299D11947B8F for ; Tue, 7 Jun 2022 12:53:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0A0584050C40; Tue, 7 Jun 2022 12:53:12 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.34.246.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id A55CA4050C42 for ; Tue, 7 Jun 2022 12:53:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654606405; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=G4XRbJdtfuPUaIqXqH0sQKicSOWUTPumDONt0qNkw/k=; b=g6TqJcXPZuWVXmkhzI5Gr8WmcfR9YMxY3D9pbv8U/Qhyy0ZU6C+tvq+lQIjaP4n6P26ztl wf4I3z4Qohej0f+Uvc7tiXwWcu55l7r4v+Cc34hkW3GxQT8l3DjlLsggBEPTrLVr1wIWjy DROe/7HxfXMUW+N1RXbgYmlO7f169bw= X-MC-Unique: dOf9vzwmM5Gc-SLh62m0wg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 14/15] qemu_validate: Check if QEMU's capable of setting main loop pool size Date: Tue, 7 Jun 2022 14:52:58 +0200 Message-Id: <5f0c58c0f832ccc64b9bca1d21af06c9382c25d4.1654606121.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654606408366100001 Content-Type: text/plain; charset="utf-8"; x-default="true" 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 Reviewed-by: Peter Krempa --- 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, } } =20 + if (def->defaultIOThread && + ((def->defaultIOThread->thread_pool_min >=3D 0 || + def->defaultIOThread->thread_pool_max >=3D 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 Q= EMU binary")); + return -1; + } + return 0; } =20 --=20 2.35.1