From nobody Sun Feb 8 04:54:38 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=1602708306; cv=none; d=zohomail.com; s=zohoarc; b=IIor3zFWosRA6S3q9CgUsoMRmhh1gfqCdyP4HRHIJN2OPOcDl05FcveeHpGGE5w4gznB3q7IXQQUJ5sqhxuNBtynEy3qUsJP7NokZC3Fvcz+BXKv3P8FfaKbg6xsgGciZt5SQTI8Du2IZDnt3dhwjuZnuQ/7bcv9HWmD2+LK5Tk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602708306; 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=HcYo/8VuepAcpLx67qwoVPFM5i60wB3zAA81i9B5WI8=; b=kOpwVIve7x0lNIv95AGegLxAnAec6lpWaF4fytcWAfb7q8wAK5KsB0eCAobY8Gcyz6OWZZgJeoQ+JM3V2IJ5E2zxCuGuYT4dCg8dxKlwfy0eS9tLC+/HTE9F2iQgvydNcip+q8JRvQzT1ifzn2Hjd1dPgcW4O1sdOYfY6iAQnvs= 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 160270830642561.95067963097722; Wed, 14 Oct 2020 13:45:06 -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-277-bcKqMJqFPHeQfY2pYFA-EQ-1; Wed, 14 Oct 2020 16:45:03 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B780186DD2F; Wed, 14 Oct 2020 20:44:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 582916EF71; Wed, 14 Oct 2020 20:44:55 +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 2392292F3A; Wed, 14 Oct 2020 20:44:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09EKhklu028769 for ; Wed, 14 Oct 2020 16:43:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id D2D0E1067DB4; Wed, 14 Oct 2020 20:43:46 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD39910921B5 for ; Wed, 14 Oct 2020 20:43:44 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (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 B4AA480CDC0 for ; Wed, 14 Oct 2020 20:43:44 +0000 (UTC) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-90-48X-MlckMiGXY4f6I0FeVQ-1; Wed, 14 Oct 2020 16:43:42 -0400 Received: by mail-io1-f50.google.com with SMTP id u19so976285ion.3 for ; Wed, 14 Oct 2020 13:43:42 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 13:43:41 -0700 (PDT) X-MC-Unique: bcKqMJqFPHeQfY2pYFA-EQ-1 X-MC-Unique: 48X-MlckMiGXY4f6I0FeVQ-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=HcYo/8VuepAcpLx67qwoVPFM5i60wB3zAA81i9B5WI8=; b=iBMW27ujR4CEVKhuKJP9v/U0fnLsJ4r+lLf08h2By/KpqpqJSzHpiPQXXyvLNmvSeU Z1XilnC+2w5Uz0GZ0AEnngsu/+ueXAkIN8XoKGx2yDZzfhRLAjMhg7yfKCd/KxECF370 8v2Pm1f6ffItBHM0JcA8cenYnG84vhnRz/LPQb+U0N1ULRVXeB4WB3rvSR4b3SWgRWxs 5WA3VOpFJOUSRT4iUfP4Rs4qbak+xCHKBxxAyRYOkDnixKkq9f6AGcPyUI0Bkc/qRREI IHGbV9jENtVWrjKls/sBNyWBffJ9S3LRij9zT3d/DCsUoKDJHqa8ORfp0KY5lM6CDIMf CqOw== X-Gm-Message-State: AOAM531c9CB/ZFXziXXXpbqN7OHWgQySlVgTrYIfW5I2pMvX6NqJK5OJ wdLHxI08VcMYdRH+OhNNf4SwaogZfsc= X-Google-Smtp-Source: ABdhPJxofjzkPX5yyeG4UxfD2xcMZBV5a9aXzUSiWy9KpLO++w90iriKUemb34cVlJYZs26XfkzGGw== X-Received: by 2002:a6b:ef0e:: with SMTP id k14mr932167ioh.131.1602708221412; Wed, 14 Oct 2020 13:43:41 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 13/24] qemu_command.c: move QEMU_CAPS_DEVICE_VHOST_SCSI check to qemu_validate.c Date: Wed, 14 Oct 2020 17:42:56 -0300 Message-Id: <20201014204307.631746-14-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.3 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.13 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 | 6 ------ src/qemu/qemu_validate.c | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f9387a65e0..29bfa665c4 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4461,12 +4461,6 @@ qemuBuildSCSIVHostHostdevDevStr(const virDomainDef *= def, g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; virDomainHostdevSubsysSCSIVHostPtr hostsrc =3D &dev->source.subsys.u.s= csi_host; =20 - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_SCSI)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("This QEMU doesn't support vhost-scsi devices")); - return NULL; - } - if (qemuBuildVirtioDevStr(&buf, "vhost-scsi", qemuCaps, VIR_DOMAIN_DEVICE_HOSTDEV, dev) < 0) { return NULL; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 5de468af60..1895ad857b 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -1895,6 +1895,14 @@ qemuValidateDomainDeviceDefHostdev(const virDomainHo= stdevDef *hostdev, "supported by vhost SCSI devices")); return -1; } + + if (hostdev->source.subsys.u.scsi_host.protocol =3D=3D + VIR_DOMAIN_HOSTDEV_SUBSYS_SCSI_HOST_PROTOCOL_TYPE_VHOST && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_SCSI)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("This QEMU doesn't support vhost-scsi devices")); + return -1; + } break; case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV: return qemuValidateDomainMdevDef(hostdev, def, qemuCaps); --=20 2.26.2