From nobody Fri Nov 21 10:13:44 2025 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; Authentication-Results: mx.zohomail.com; dkim=pass; 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=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1762797584; cv=none; d=zohomail.com; s=zohoarc; b=fMySr7PFFka6cuq4Xn+On4tCcP/7u2mAyhi1UE2lLWhf9oaevfq6ivfoGn1KMiMGe2OzF1c7kFgP1cP+uA8SBso8ocqgx9tRjsWRAhUjPj4B2DeFD3Ivku05KW/tJOGBMkgTCH1xUKKmpBomAlAR0S584e4npK2D1sAYLgTU1Lw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762797584; h=Content-Transfer-Encoding:Cc:Cc: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:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=pSr6IinDfgqbkyU4qQawtrsmj6w3NLQvmlnsGKLVGB0=; b=YaQeJNdZLjuRScTlGIf+yJcdmT91B0ZBEdtdrkukjtcIA1MiOqIYHtmSqAhTTueFLaWhCo5iXfUIP9mAVIwBDM965gBmh6BtXN2ZUzLrSJsR4kszq3M0qAonrwKEB8n8ResYlP/k8dn3cAs1I5DervEjZOhapm6KcTCWo28QrEA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1762797584319248.69564190011874; Mon, 10 Nov 2025 09:59:44 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 683D844B45; Mon, 10 Nov 2025 12:59:43 -0500 (EST) Received: from [172.19.199.29] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id F134344B93; Mon, 10 Nov 2025 12:58:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id C0D66448F0; Mon, 10 Nov 2025 12:57:45 -0500 (EST) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 35776449C0 for ; Mon, 10 Nov 2025 12:57:45 -0500 (EST) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-b3c2db014easo611342066b.0 for ; Mon, 10 Nov 2025 09:57:45 -0800 (PST) Received: from tulp.my.domain (84-25-144-101.cable.dynamic.v4.ziggo.nl. [84.25.144.101]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b72bf9bc214sm1182030966b.52.2025.11.10.09.57.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Nov 2025 09:57:42 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=gmail.com; s=20230601; t=1762797464; x=1763402264; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pSr6IinDfgqbkyU4qQawtrsmj6w3NLQvmlnsGKLVGB0=; b=RK5V7xJBXHwiT6dsZ+6eOYHTnK2pIldY3RUjDAKy9MB8pYj7Kc8L76BWh8cbkS76r/ uNxOPtfGgalg7OT7hIKlKYkP5ZksLqqbWQUH6TNIvna4OV9TZGjPywy44zSj1pzH7tCQ R0R95rwpN59GkRu9ZssahIttGwYksJNmev/1sEZawzMQ/yLOgeEVvK6GCzqNALiPd0Tn 0SxMm8c8uhih+i5ZTxqMI9USO4TSqRVIoz+erwFfChF9/Uy2NQFX56E+MJbYehgZh/sM s54ENQztpb2UEAO6GyJOB1wTJbcg+PFmw9O3XTBe9fdtUXXmX/2y1BecGgkGrVgTfY1P KBmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762797464; x=1763402264; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=pSr6IinDfgqbkyU4qQawtrsmj6w3NLQvmlnsGKLVGB0=; b=SwafDBv/j6IfI6APzd62Wf2VGIONzLG+HBOaLx7LKy15YsONO7iFCsMx0Bqs0ZS3Hf /Dn7DoPWavKkIXNM4AsN6VDCiEzkd/89eYj/udZ5FwJgSRL0Q4K2ybUXx7+cvvVxqS9a EuniuHg7JI6GJ6HroOvqtHujTD5oEpEYyXh5sdJwE+EVZuw19rfsvpB2BslyFBPUPbNZ 9ftwNsnZ/wLUis5oKBSUZC1fNM7i45h1aLhqSqMzNayKCVf3Ml+VJ5RMg9MLgyr6XN2w VwvTPHqosZMAL0/d7E88vY8GtJUGA4fHTeZ8evDLT7AyloH04GXxlZp9n0uEeYWlucGZ ybpQ== X-Gm-Message-State: AOJu0YxbOZPnoHEa6m4cBjowZXpkuT4MDETGUZrkUrxtxC0nn9Klvv33 sEpqZ7QDduKU0+7BaRCYyUVIbQG+zNMDXmPul2IvENRyBHQSPAoV4LP0TrOkF43oagCWyw== X-Gm-Gg: ASbGncvoNXU9ODsmObsVcykF4/q/u4ROG/ZGChaz8hH+kgtZgvtpJb6DMdKqFu4IXi6 MBrrKr+yLlZLZSm0LZsVub51fgtiZrtleINSL1OYXbh6RezyhEN+ixAhwBYsBczf2NhPq/2ATd0 IH6WFo5YdhCcQ7WsVYHZyIhLNpmKHcE9VcUjiUcYz16eEtssHqFXlZnxZFpTLSlP8eXAHQoUVPZ f7U+3Ez/aNXxUPE3GPSfOWEMqevVNnZ1/cEFET4RoHDj9yiOGr63T0i5JuXy8yFQILlgAfpaEgT qFVvVvGJQf7bmc7cNVXYA5UDVRmzRcaly9fte4mFrSueXzAmchtBIwcelISwBLh27UEXvv835au 8EKUwxz4Vzqcj1UrgEibG3KT3KSHpFqQAK1hHf1Dg5gKvBQ11EVKhMC/QJOBnppQ24kS7l+0qQN O6g+obInR4rJMP5Tnp9wF6HNJG8nOvlxs0ZDaDv0Y+jkr9Nw== X-Google-Smtp-Source: AGHT+IHwBIe89H+KIxAkeyUg+ggl6ti2BYP+8Ng7gzA4U78sC2OOdVU6lBzxkqvZpj0UasDx2ydOnw== X-Received: by 2002:a17:906:528a:b0:b73:16fe:92d0 with SMTP id a640c23a62f3a-b7316fe948emr143532566b.18.1762797463276; Mon, 10 Nov 2025 09:57:43 -0800 (PST) From: Roman Bogorodskiy To: devel@lists.libvirt.org Subject: [PATCH 1/4] conf: domain_validate: make disk queue configuration driver specific Date: Mon, 10 Nov 2025 18:55:39 +0100 Message-ID: <20251110175542.36724-2-bogorodskiy@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251110175542.36724-1-bogorodskiy@gmail.com> References: <20251110175542.36724-1-bogorodskiy@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JZAT7MREXS6QOJ4HNPOGVJ55HP2AOSK3 X-Message-ID-Hash: JZAT7MREXS6QOJ4HNPOGVJ55HP2AOSK3 X-MailFrom: bogorodskiy@gmail.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 CC: Roman Bogorodskiy 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: X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1762797585525158500 Content-Type: text/plain; charset="utf-8" Currently, virDomainDiskDefValidate() allows to configure disks' number of queues and queue size for virtio disks only. However, the bhyve driver allows to configure these for the NVMe disks, so make this check driver-specific. Signed-off-by: Roman Bogorodskiy --- src/conf/domain_validate.c | 12 ------------ src/qemu/qemu_driver.c | 15 +++++++++++++++ src/qemu/qemu_validate.c | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index 17955decc0..8085d782c5 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -835,18 +835,6 @@ virDomainDiskDefValidate(const virDomainDef *def, return -1; } =20 - if (disk->queues) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("queues attribute in disk driver element is o= nly supported for virtio bus")); - return -1; - } - - if (disk->queue_size) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("queue_size attribute in disk driver is only = supported for virtio bus")); - return -1; - } - if (disk->event_idx !=3D VIR_TRISTATE_SWITCH_ABSENT) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("disk event_idx mode supported only for virti= o bus")); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index a1b1edcbbf..88c2b4edc3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6745,6 +6745,21 @@ qemuDomainAttachDeviceConfig(virDomainDef *vmdef, _("target %1$s already exists"), disk->dst); return -1; } + + if (disk->bus !=3D VIR_DOMAIN_DISK_BUS_VIRTIO) { + if (disk->queues) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queues attribute in disk driver element = is only supported for virtio bus")); + return -1; + } + + if (disk->queue_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue_size attribute in disk driver is o= nly supported for virtio bus")); + return -1; + } + } + if (virDomainDiskTranslateSourcePool(disk) < 0) return -1; if (qemuCheckDiskConfigAgainstDomain(vmdef, disk) < 0) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 747e54bf44..5008391707 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3698,6 +3698,20 @@ qemuValidateDomainDeviceDefDisk(const virDomainDiskD= ef *disk, } } =20 + if (disk->bus !=3D VIR_DOMAIN_DISK_BUS_VIRTIO) { + if (disk->queues) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queues attribute in disk driver element is o= nly supported for virtio bus")); + return -1; + } + + if (disk->queue_size) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("queue_size attribute in disk driver is only = supported for virtio bus")); + return -1; + } + } + return 0; } =20 --=20 2.51.0