From nobody Mon Feb 2 05:55:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1768814152; cv=none; d=zohomail.com; s=zohoarc; b=c3MtXnilht/W+d6kzel/1wFnWOUu6lDDOnXlhhns3kExI0RF2rt7UIgjmA6VVkeQz6juYi3BlSqmQ4/r51Ihe+vnZja/hLCmP6HfqpEFIuPQT7Euhk533pq9HnfGi5FwQ/on2wwdC7PyNhc6+STG19C3XgMJK4rRrHOsnIT3F2Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768814152; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=Oykg4Ts0QcV/2W45tW6iyhGWwWMfy3RUHN3n29g3zDo=; b=Jo9OxoOCAHUanJGjaashhkneraOPbZ35o/IL+VGQjiyFWQWMRS5KHX/SrdVLlUnSxOwozpy5Kn2GHUaZEYPF9qdAi8JU7CADv5ffWKfF7VBzzdvTx0Fq2Pbq0/KZysLuLdLl3G949ThPZ5erasMGDspd0bhTU37Me3vknt9jtoM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1768814152518902.0363045311866; Mon, 19 Jan 2026 01:15:52 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 090FD43DC2; Mon, 19 Jan 2026 04:15:52 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 107FA43DBC; Mon, 19 Jan 2026 04:13:01 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id EE12741A10; Mon, 19 Jan 2026 04:12:55 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 884314199B for ; Mon, 19 Jan 2026 04:12:51 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-64-JvcJqHEfPvisBnJ7AQHO4Q-1; Mon, 19 Jan 2026 04:12:48 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EF24819560B2 for ; Mon, 19 Jan 2026 09:12:47 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.5]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3C1C319560A7 for ; Mon, 19 Jan 2026 09:12:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768813971; h=from:from: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; bh=Oykg4Ts0QcV/2W45tW6iyhGWwWMfy3RUHN3n29g3zDo=; b=hqvhfzLpL6/ymX5GJZhHoI69v3sTCrA+gOfevSOb0eIiRranQAyqNlb0jIwU7TKOmXfA7M JMMls4u43dOH0J556FwVo9DHCdieqbit2st6wBFP5lTDlBZGFCliw14iPaxA5nhmXXKh+B YMRXx4KqTPfhLVjXIzdN6+NpvuCeFqs= X-MC-Unique: JvcJqHEfPvisBnJ7AQHO4Q-1 X-Mimecast-MFC-AGG-ID: JvcJqHEfPvisBnJ7AQHO4Q_1768813968 To: devel@lists.libvirt.org Subject: [PATCH 1/4] qemuDomainSetThrottleGroup: Enforce non-zero 'groupname' string length Date: Mon, 19 Jan 2026 10:12:41 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: MbGrkqzMapLiqPdge9bPaUSUV5xrsFgq7cPOscgAHEw_1768813968 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: NH57BSZZ77ATCXVMIM7KBCEHLB5PYSX4 X-Message-ID-Hash: NH57BSZZ77ATCXVMIM7KBCEHLB5PYSX4 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768814170947158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Having a name of 0 characters makes no sense. Reject it. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3f154969b8..bed60d1ca7 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20354,6 +20354,12 @@ qemuDomainSetThrottleGroup(virDomainPtr dom, virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1); + if (strlen(groupname) =3D=3D 0) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("'groupname' parameter string must have non-zero = length")); + return -1; + } + if (qemuDomainValidateBlockIoTune(params, nparams) < 0) return -1; --=20 2.52.0 From nobody Mon Feb 2 05:55:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1768814230; cv=none; d=zohomail.com; s=zohoarc; b=ETdOnNHZVT9ohCuvZyic2dd8G4xHfpYw5UIkEBSsU83FtwpN9xsxCP5CmG5la8vEzVFGjAuu+ATB82TbHleYsXaBgHg+Bpjx+F4dhbSmbl3XCUHKSwosdASAWztKOIRa8qfJwYVRuV3jSmAVG0E3+MiNL66P9nLwI/D1e3pd+Yk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768814230; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=gQMtwpgIWS1pgfKlfpivB6TcfY4azndI7ZhCDOm2Od4=; b=YyZRQ2ym76xZzWuhcxmYWG5YXLZWOogqQ/LXtEkkwVygCQVUSwV++PH354H7URfpkzBFkG/3KzIHoJ39xhZ2TxLQjeKXK4IvNq/LgcNg8THjf141q57E66IdIIbQ3R3A7kJlMS9QD1TcCpUrBB3J7AP1K2wNnz3iUUDfCWSzheE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 176881423072096.27957304071106; Mon, 19 Jan 2026 01:17:10 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 897A141B97; Mon, 19 Jan 2026 04:17:09 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 8155743E6B; Mon, 19 Jan 2026 04:13:02 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 4E19F4199B; Mon, 19 Jan 2026 04:12:56 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DCBC83FB95 for ; Mon, 19 Jan 2026 04:12:51 -0500 (EST) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-Gjmj2c8VNtawUv9yNm0AsA-1; Mon, 19 Jan 2026 04:12:49 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 30A98180034A for ; Mon, 19 Jan 2026 09:12:49 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.5]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 767D319560A7 for ; Mon, 19 Jan 2026 09:12:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768813971; h=from:from: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; bh=gQMtwpgIWS1pgfKlfpivB6TcfY4azndI7ZhCDOm2Od4=; b=DBi5AYn5Huhwcz2RLjNPP3pTg7g1G/FQkE7AroF1TnWSLF6ds98fumBCXEwgrq57Tzseay pepakQFQcm65YHu0fZNOqlCsdzfQEbrXbsN+gGDmYQjrsXhfzd3Dt18jDbX+Kky1dNhUAU KR3qUDoH7oMWz2f1tWp3/BOA2DnpL4k= X-MC-Unique: Gjmj2c8VNtawUv9yNm0AsA-1 X-Mimecast-MFC-AGG-ID: Gjmj2c8VNtawUv9yNm0AsA_1768813969 To: devel@lists.libvirt.org Subject: [PATCH 2/4] qemuDomainSetBlockIoTuneField: Move setting of 'group_name' out of the loop Date: Mon, 19 Jan 2026 10:12:42 +0100 Message-ID: <91b6c5c584bdc5c5d19091f15e80423067808c36.1768813932.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: H8leT1BHy5AVXmTkPaE4eyBpn6xnDq0HgoYrkkur5ik_1768813969 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: C54S74Z2OQL6OXQALTSJ3FSXWN54NGB6 X-Message-ID-Hash: C54S74Z2OQL6OXQALTSJ3FSXWN54NGB6 X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768814231572158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The refactor will simplify further change which will introduce another source for the group name. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bed60d1ca7..8c7a2e9fe2 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15182,6 +15182,7 @@ qemuDomainSetBlockIoTuneFields(virDomainBlockIoTune= Info *info, int *eventNparams, int *eventMaxparams) { + const char *param_group_name =3D NULL; size_t i; #define SET_IOTUNE_FIELD(FIELD, BOOL, CONST) \ @@ -15227,15 +15228,8 @@ qemuDomainSetBlockIoTuneFields(virDomainBlockIoTun= eInfo *info, WRITE_IOPS_SEC_MAX); SET_IOTUNE_FIELD(size_iops_sec, SIZE_IOPS, SIZE_IOPS_SEC); - /* NB: Cannot use macro since this is a value.s not a value.ul */ if (STREQ(param->field, VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAME)) { - info->group_name =3D g_strdup(param->value.s); - *set_fields |=3D QEMU_BLOCK_IOTUNE_SET_GROUP_NAME; - if (virTypedParamsAddString(eventParams, eventNparams, - eventMaxparams, - VIR_DOMAIN_TUNABLE_BLKDEV_GROUP_NA= ME, - param->value.s) < 0) - return -1; + param_group_name =3D param->value.s; continue; } @@ -15253,6 +15247,16 @@ qemuDomainSetBlockIoTuneFields(virDomainBlockIoTun= eInfo *info, WRITE_IOPS_SEC_MAX_LENGTH); } + if (param_group_name) { + info->group_name =3D g_strdup(param_group_name); + *set_fields |=3D QEMU_BLOCK_IOTUNE_SET_GROUP_NAME; + if (virTypedParamsAddString(eventParams, eventNparams, + eventMaxparams, + VIR_DOMAIN_TUNABLE_BLKDEV_GROUP_NAME, + param_group_name) < 0) + return -1; + } + #undef SET_IOTUNE_FIELD return 0; --=20 2.52.0 From nobody Mon Feb 2 05:55:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1768814329; cv=none; d=zohomail.com; s=zohoarc; b=SiE+zd/bH0+kBsXgz8hSagfOoByTDIiU/ZzytQTO0rV+LbgeEawuxhM/OIR2rkGWLE/oAzRJxBqoMMbpPouLvE7lp24nIewyXGtvfIv8IBEtphH0sYewxHlboIJ+PKfy1eBvkJrD+JyKvUjLEdRwHjkgQB9f/laXbdSOH3kMX9U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768814329; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=bh8HcdMeZcrWiySO23x9dqvX8llmt2vK/oM6CtZiSTY=; b=MUT7uYcVHEQx+QzCjGvPhReQD9Mzx62musjCr4Nl4zBtiv+4wvyi4DUTBgcRK4pa3gbjUzwmTv1yG25BcEvsZ7N4tBkD8Vk93RTJKVdZWqIMwlNzG1jh+wmX5q0gkNcFiDXVUudAddUW6cLuODnsExkq4zVw/OD3bwPaF/NvA2o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1768814329086651.4187082848979; Mon, 19 Jan 2026 01:18:49 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 379EE41980; Mon, 19 Jan 2026 04:18:48 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 89C6D43F89; Mon, 19 Jan 2026 04:13:06 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id A1AAF43DDF; Mon, 19 Jan 2026 04:13:01 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 326BE419C4 for ; Mon, 19 Jan 2026 04:12:53 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-288--sJPWGExMtOuFRrPNhN5NQ-1; Mon, 19 Jan 2026 04:12:51 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 75DAA195609D for ; Mon, 19 Jan 2026 09:12:50 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.5]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A7BCE19560A7 for ; Mon, 19 Jan 2026 09:12:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768813972; h=from:from: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; bh=bh8HcdMeZcrWiySO23x9dqvX8llmt2vK/oM6CtZiSTY=; b=aGg96ENU0BxQf8PNKpWhmwvYbLc5w7A+wliouMBIJ5B7GXGrWwKv8BLokGaj7phAjH5NTn nBTloDS2SW8r+NetscdlcbJayToCtDdFtgoZtGJDUFAePNbuhMpMVTJPQunv850EpUJV2f szpNKLoZp6t8zFynfCxUQWm8NmrgAqc= X-MC-Unique: -sJPWGExMtOuFRrPNhN5NQ-1 X-Mimecast-MFC-AGG-ID: -sJPWGExMtOuFRrPNhN5NQ_1768813970 To: devel@lists.libvirt.org Subject: [PATCH 3/4] qemuDomainSetThrottleGroup: Always honour thottle group name passed as argument Date: Mon, 19 Jan 2026 10:12:43 +0100 Message-ID: <22ce4337465d98880cf4819bd761f51ba128f562.1768813932.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _kaxRM0TaAPPR0IID516CIhCu5nm4OPBC-ozF0JwFSY_1768813970 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: T56JEZNV3T52KUU4FF6EFFJ6KMD6WB2S X-Message-ID-Hash: T56JEZNV3T52KUU4FF6EFFJ6KMD6WB2S X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768814330042158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Due to the code share with 'qemuDomainSetBlockIoTune' the throttle group setting code accepts the throttle group name also via typed parameters. In 'qemuDomainSetThrottleGroup', this means that there are 2 ways to pass it the throttle group name and both are handled slightly differently. Specifically the name of the group used in the list of groups is the name taken from the typed parameters rather than the one passed via API. We also don't validate that they match. Now if the name in the typed parameters is missing we'd add empty string to the group list which would later crash when looking up the group name. To avoid this problem always use the name passed via argument. This is achieved by passing it into 'qemuDomainSetBlockIoTuneFields' so that it overrides whatever is in the typed parameters. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8c7a2e9fe2..9addad3b9e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15177,6 +15177,7 @@ static int qemuDomainSetBlockIoTuneFields(virDomainBlockIoTuneInfo *info, virTypedParameterPtr params, int nparams, + const char *group_name, qemuBlockIoTuneSetFlags *set_fields, virTypedParameterPtr *eventParams, int *eventNparams, @@ -15247,6 +15248,10 @@ qemuDomainSetBlockIoTuneFields(virDomainBlockIoTun= eInfo *info, WRITE_IOPS_SEC_MAX_LENGTH); } + /* The name of the throttle group passed via API always takes preceden= ce */ + if (group_name) + param_group_name =3D group_name; + if (param_group_name) { info->group_name =3D g_strdup(param_group_name); *set_fields |=3D QEMU_BLOCK_IOTUNE_SET_GROUP_NAME; @@ -15394,6 +15399,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, if (qemuDomainSetBlockIoTuneFields(&info, params, nparams, + NULL, &set_fields, &eventParams, &eventNparams, @@ -20388,6 +20394,7 @@ qemuDomainSetThrottleGroup(virDomainPtr dom, if (qemuDomainSetBlockIoTuneFields(&info, params, nparams, + groupname, &set_fields, &eventParams, &eventNparams, --=20 2.52.0 From nobody Mon Feb 2 05:55:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1768814262; cv=none; d=zohomail.com; s=zohoarc; b=ia9xufbJuNIhec4lpGC+pt/lKx73fw9seqTbuhVMB0TWhpLReSCbGy46G6jV4dchlWB50JVOHL2SjnKOHYhjYj1B39QTRI8RJ6wQ9AnDRbiBkEdYeMA5Ig+OB7W+6tJKllj/0Wvi61WTAOFRz9RHdMJvFe8BSvr/K9qojBkHmJU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768814262; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=bgsIOpCFvpfM8eKd+/Ia0l6OshOxipO9Jui7uzTZWtw=; b=igvlBKisLFrmCh2oJS+ZKgbpQnoKK8E9HIETU+bKYSXkQ/+h0lelv8ydvNd8loVoSWBcnU/oycJRmAiZwYhiqUGVmwyT0ld3ya7ug/BiJ9z5uqDFjbeN9iiX/TneKyldX4v7yIXg3K7wJg3dPfvoq0lsv8JBPZnVsoTX5xMr0JA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1768814262453911.7145179914974; Mon, 19 Jan 2026 01:17:42 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 84F0C419C4; Mon, 19 Jan 2026 04:17:41 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 2C8F543ECB; Mon, 19 Jan 2026 04:13:04 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 7AFDF4199F; Mon, 19 Jan 2026 04:13:00 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 7E0DE419DD for ; Mon, 19 Jan 2026 04:12:54 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-509-c5IBYPWeOSCG20CwbxzwVw-1; Mon, 19 Jan 2026 04:12:52 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A04CC1956053 for ; Mon, 19 Jan 2026 09:12:51 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.5]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DFB3719560A7 for ; Mon, 19 Jan 2026 09:12:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768813974; h=from:from: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; bh=bgsIOpCFvpfM8eKd+/Ia0l6OshOxipO9Jui7uzTZWtw=; b=BhDN+Whai2FGLeBjthoQQpr05rpWtZChAnioVYROQ1Sc4pbzzxqtjiHCP+jvDYxWLABLQZ pkg+Cpte6Y0rg1Qt8yUDRTm+kul/9IclevmAP7bPdrF0/icjZ4vGKut/bbG+hkgMoNFvQg DX15uv5GPgSwEbwsFSoqv8POGm/mczA= X-MC-Unique: c5IBYPWeOSCG20CwbxzwVw-1 X-Mimecast-MFC-AGG-ID: c5IBYPWeOSCG20CwbxzwVw_1768813971 To: devel@lists.libvirt.org Subject: [PATCH 4/4] qemuDomainSetThrottleGroup: Don't put group name into the 'tunable' event twice Date: Mon, 19 Jan 2026 10:12:44 +0100 Message-ID: <9eb1530d13f21ed43d58863755e79ba161fb9c44.1768813932.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: TV2BKOGyerglVOeFROODjMtJKAV-6Gkt_5EHORmiQTs_1768813971 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CVDQZFGII4FY62VNEEEABSRMJ7XMRVKW X-Message-ID-Hash: CVDQZFGII4FY62VNEEEABSRMJ7XMRVKW X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768814263676158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa 'qemuDomainSetBlockIoTuneFields' already populates the contents of the VIR_DOMAIN_EVENT_ID_TUNABLE params with the group name so there's no need to do it explicitly. We'd report the group name twice: event 'tunable' for domain 'cd': blkdeviotune.group_name: asdf blkdeviotune.total_bytes_sec: 1234 blkdeviotune.group_name: asdf Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9addad3b9e..cdd333c882 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20387,10 +20387,6 @@ qemuDomainSetThrottleGroup(virDomainPtr dom, if (virDomainObjGetDefs(vm, flags, &def, &persistentDef) < 0) goto endjob; - if (virTypedParamsAddString(&eventParams, &eventNparams, &eventMaxpara= ms, - VIR_DOMAIN_TUNABLE_BLKDEV_GROUP_NAME, grou= pname) < 0) - goto endjob; - if (qemuDomainSetBlockIoTuneFields(&info, params, nparams, --=20 2.52.0