From nobody Mon Feb 9 18:48:00 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1599813825; cv=none; d=zohomail.com; s=zohoarc; b=O2vLDhiJdx8ONCWXlZy0ixPxtpXsC672WHUJie5/79f4EXXm0kDf/yCIaqNqE6UvH1TUKNJEqyJPkZySN2uy3hPDeUFLh5E980K/dgkZbIhUHruMTe9IKIuOzXYK7fnLeYXD9vp0zGPdTI4lVNZZJ93XjAeT1uU5qMy8VTZRBO8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599813825; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=WvDaa3hSpu22HYXSrE0AB6SNRFMXv7/ySSV2Yhk7Oqg=; b=Ke6wWt3hsWkl64/xIMmKfMaorP8tUcqwg1je2SrwXY03ygFJBP44/whsWM207b3W/sjqn/SaMxEz14VCv/jAqWb7Mw5/WxbRAOWOgI2cKHB+j0EooqZFTyPreKXbXehimEd99FRs976vWX4+DrrAFz4pJ78WpnpJxjCz2qQk1SU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1599813825596684.920601538193; Fri, 11 Sep 2020 01:43:45 -0700 (PDT) Received: from localhost ([::1]:41320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGeem-0003sI-4F for importer@patchew.org; Fri, 11 Sep 2020 04:43:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGebX-0005xp-Fm; Fri, 11 Sep 2020 04:40:23 -0400 Received: from forwardcorp1j.mail.yandex.net ([5.45.199.163]:46174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGebV-0002GJ-LG; Fri, 11 Sep 2020 04:40:23 -0400 Received: from sas1-ec30c78b6c5b.qloud-c.yandex.net (sas1-ec30c78b6c5b.qloud-c.yandex.net [IPv6:2a02:6b8:c14:2704:0:640:ec30:c78b]) by forwardcorp1j.mail.yandex.net (Yandex) with ESMTP id C9CD02E1550; Fri, 11 Sep 2020 11:40:19 +0300 (MSK) Received: from sas2-32987e004045.qloud-c.yandex.net (sas2-32987e004045.qloud-c.yandex.net [2a02:6b8:c08:b889:0:640:3298:7e00]) by sas1-ec30c78b6c5b.qloud-c.yandex.net (mxbackcorp/Yandex) with ESMTP id rz6eo6z8ph-eIv0t21e; Fri, 11 Sep 2020 11:40:19 +0300 Received: from dynamic-vpn.dhcp.yndx.net (dynamic-vpn.dhcp.yndx.net [2a02:6b8:b080:7216::1:a]) by sas2-32987e004045.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id v35icu4tRa-eIlWoU0S; Fri, 11 Sep 2020 11:40:18 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) Precedence: bulk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1599813619; bh=WvDaa3hSpu22HYXSrE0AB6SNRFMXv7/ySSV2Yhk7Oqg=; h=In-Reply-To:In-Reply-To:Message-Id:References:References:Date: Subject:To:From:Cc; b=CMzi9Ix71BXiqr8jIBbSbEIOLf6coLrAUaCKxzcC/J292xUZTxaWFDZl04TUSrLBV dCfKNs6ydo6ozRtllmjQ+nFQs4k+DE4eVtVbU8dXEUuSe+Xixd6Y/6f0jFxLSRN8Yf z7q4IW/eJsmOMg9yCeC0W5JtAFOYOyGQmm/QQiJg= Authentication-Results: sas1-ec30c78b6c5b.qloud-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Dima Stepanov To: qemu-devel@nongnu.org Subject: [PATCH v5 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk Date: Fri, 11 Sep 2020 11:39:46 +0300 Message-Id: <4d3e683a87557bcef520826c54aa3e5ab7c64111.1599813294.git.dimastep@yandex-team.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=5.45.199.163; envelope-from=dimastep@yandex-team.ru; helo=forwardcorp1j.mail.yandex.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/11 04:40:08 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, lvivier@redhat.com, thuth@redhat.com, qemu-block@nongnu.org, mst@redhat.com, stefanha@gmail.com, jasowang@redhat.com, dgilbert@redhat.com, mreitz@redhat.com, fengli@smartx.com, yc-core@yandex-team.ru, pbonzini@redhat.com, raphael.norwitz@nutanix.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add support for the vhost-user-blk-pci device. This node can be used by the vhost-user-blk tests. Tests for the vhost-user-blk device are added in the following patches. Signed-off-by: Dima Stepanov Reviewed-by: Raphael Norwitz --- tests/qtest/libqos/virtio-blk.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/qtest/libqos/virtio-blk.c b/tests/qtest/libqos/virtio-bl= k.c index 5da0259..c0fd9d2 100644 --- a/tests/qtest/libqos/virtio-blk.c +++ b/tests/qtest/libqos/virtio-blk.c @@ -30,7 +30,8 @@ static void *qvirtio_blk_get_driver(QVirtioBlk *v_blk, const char *interface) { - if (!g_strcmp0(interface, "virtio-blk")) { + if (!g_strcmp0(interface, "virtio-blk") || + !g_strcmp0(interface, "vhost-user-blk")) { return v_blk; } if (!g_strcmp0(interface, "virtio")) { @@ -120,6 +121,17 @@ static void virtio_blk_register_nodes(void) qos_node_produces("virtio-blk-pci", "virtio-blk"); =20 g_free(arg); + + /* vhost-user-blk-pci */ + arg =3D g_strdup_printf("id=3Ddrv0,chardev=3Dchdev0,addr=3D%x.%x", + PCI_SLOT, PCI_FN); + opts.extra_device_opts =3D arg; + add_qpci_address(&opts, &addr); + qos_node_create_driver("vhost-user-blk-pci", virtio_blk_pci_create); + qos_node_consumes("vhost-user-blk-pci", "pci-bus", &opts); + qos_node_produces("vhost-user-blk-pci", "vhost-user-blk"); + + g_free(arg); } =20 libqos_init(virtio_blk_register_nodes); --=20 2.7.4