From nobody Sat Feb 7 18:46:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1602708273; cv=none; d=zohomail.com; s=zohoarc; b=OkQrrYTEgzZKX8HGEM/7thKEYPuWJrmnCKWAbrL4p0juOqgWIPA0/lHlraggmrL6fe+3q7goVJ1ynn8Cs7wXEVRB/4V11lhEacqFq2xo0PnJNYpjKgpBH9UzRKU93Bd/yAQuOxrDw0QKFfj8VlUqw68f6YDgnzLmLFK3MN3vdAQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602708273; h=Content-Type:Content-Transfer-Encoding:Cc: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=BOcGASYaeGPzKxpY8KB5+7sJSQKIxPpixfjkUnGQzEY=; b=AebB1KpAo/LCdGVpAUvWbh2S4vgGGUPjlzgW0N0b4WdapHPiLFkSqyFiFI1F+l13ko3uRBveuXMKxLB7osHJg7o7Qbxy2GlzEIY89gRe5EfutbyJff/D25sAB7zUTwMigfd4y2UGEbcgVem7NhetoB1NOyNtNer3r+eG8uC5PLk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 160270827318221.082514827738237; Wed, 14 Oct 2020 13:44:33 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-183-8O2mQBl1PS2Ku4Soyh4pPA-1; Wed, 14 Oct 2020 16:44:29 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B502F57052; Wed, 14 Oct 2020 20:44:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92F7760C07; Wed, 14 Oct 2020 20:44:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 62DED18095FF; Wed, 14 Oct 2020 20:44:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09EKhYql028655 for ; Wed, 14 Oct 2020 16:43:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 51838207B2D4; Wed, 14 Oct 2020 20:43:34 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4C496200A795 for ; Wed, 14 Oct 2020 20:43:32 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 14B058007DF for ; Wed, 14 Oct 2020 20:43:32 +0000 (UTC) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-L05GuHCNNvG41-XOtyJ76Q-1; Wed, 14 Oct 2020 16:43:29 -0400 Received: by mail-io1-f53.google.com with SMTP id l8so905230ioh.11 for ; Wed, 14 Oct 2020 13:43:29 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c6:5a9b:54fc:df2a:8a5e:989b]) by smtp.gmail.com with ESMTPSA id i4sm492202ilc.27.2020.10.14.13.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 13:43:28 -0700 (PDT) X-MC-Unique: 8O2mQBl1PS2Ku4Soyh4pPA-1 X-MC-Unique: L05GuHCNNvG41-XOtyJ76Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BOcGASYaeGPzKxpY8KB5+7sJSQKIxPpixfjkUnGQzEY=; b=LSzXZnrzHdGTvtjINchcs/WA5BiRTVrMnAcNRPPOW6bGBZ6t37fTreoWsAFyDAkb6Q el7eIvg1IIO7R8aX9b79MLgppt8zGZaaDv7mobRLfScrQ0tv2WbotIiHJNrEn3wCPM0X Q7kclxTkCwCos4fy3PLexlROuScFDriU9OiF+kI3IgYOTniJKeaR01USMFcBoEcczyqu wDkHGt8wyuC+8eGjtb0RnkTPmioJcui6el013YuGZ5+QUMsy9vXoH6DMjCFmq+gjBrFp hADBjSSC0EBm+gqMjf4lOtfCDA54zqs/DAvjHBObO+Wnbyv/fsiIV49LqxEjpQZOACdT p4Sw== X-Gm-Message-State: AOAM530OqSGoCaTQPbkp9lMqRKK9lYuKbZJOMAomyJI8YEt4egTdKsVj V6cRs+BHX0SLhBgwoLZJKYrXxGOPHmU= X-Google-Smtp-Source: ABdhPJx2nlcVVa2C6jUOMl7p8fPP6w5xohdMa8x/oeZFwIuql2J9AnFQ9S5c+pxxaXsS9eI/sb8thg== X-Received: by 2002:a05:6638:1651:: with SMTP id a17mr1083015jat.39.1602708209049; Wed, 14 Oct 2020 13:43:29 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 05/24] qemu_command.c: move DISK_BUS_VIRTIO validation to qemu_validate.c Date: Wed, 14 Oct 2020 17:42:48 -0300 Message-Id: <20201014204307.631746-6-danielhb413@gmail.com> In-Reply-To: <20201014204307.631746-1-danielhb413@gmail.com> References: <20201014204307.631746-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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 Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 7 ------- src/qemu/qemu_validate.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b2c6bd43a2..a5abd814a2 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1683,13 +1683,6 @@ qemuBuildDiskDeviceStr(const virDomainDef *def, } =20 if (disk->queues) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES)= ) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("num-queues property isn't supported by t= his " - "QEMU binary")); - return NULL; - } - virBufferAsprintf(&opt, ",num-queues=3D%u", disk->queues); } =20 diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 289b99eea7..4a74265ced 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -2265,6 +2265,16 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDom= ainDiskDef *disk, break; =20 case VIR_DOMAIN_DISK_BUS_VIRTIO: + if (disk->queues) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES)= ) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("num-queues property isn't supported by t= his " + "QEMU binary")); + return -1; + } + } + break; + case VIR_DOMAIN_DISK_BUS_XEN: case VIR_DOMAIN_DISK_BUS_SD: break; --=20 2.26.2