From nobody Tue Feb 10 08:26:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1686085880; cv=none; d=zohomail.com; s=zohoarc; b=H+N06+cWorkfatfmG3yHt5Gd8HmDFaDqFm+WkaGT7HqEAyl4HVnyjEg+lKb1s8zeFqwyYst33ZZyhzBjxgJzzEbdlqwPYOv7l+lx6hcd9pwvFcpB0iAX49JLGvnGZi1uUocbbCZ0xsz5MqPIJQscOd8W8dBaqjtGRgsJ3R3Gq9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1686085880; h=Content-Type:Content-Transfer-Encoding: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=hPb+hUljPwku9bmNbnyagDi/lSo49JZV8hWMGvLdqAE=; b=Se3qKpjUnH0ejNS8GXmuB++O2evhiD5yCcCqJG0bXLJSJ5wm4VA7tZ0BLXwEl9WVxHS1WoKAv8HQ7vpmnquU03Wve6p3dmc1gOa+sJb7Eqddw++52OOGcJWb037/zKnxem+nI1CkLO+dGtzKKdoCsO8sILBn4f1m/yDKGJaYQL4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1686085880985877.5204947966668; Tue, 6 Jun 2023 14:11:20 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-382-2nFTgxF5OqKkpBM5WV5-Kg-1; Tue, 06 Jun 2023 17:11:17 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2673E3806723; Tue, 6 Jun 2023 21:11:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 137352026E03; Tue, 6 Jun 2023 21:11:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B42EF19452D1; Tue, 6 Jun 2023 21:11:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A064919465BA for ; Tue, 6 Jun 2023 21:11:05 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 90ED21121314; Tue, 6 Jun 2023 21:11:05 +0000 (UTC) Received: from himantopus.redhat.com (unknown [10.22.18.117]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6FDE01121315 for ; Tue, 6 Jun 2023 21:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686085879; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hPb+hUljPwku9bmNbnyagDi/lSo49JZV8hWMGvLdqAE=; b=NWCP3CvPCvG+0k6vyNrFgKhE8end6soxgAzc4NFNuf6GY8rP4D6unaVej6T7RWTZBTCxX0 OQyzxP3f9D481FV27Va+PYExbAF1czPFjShuTnKBOZLKgwuu4i8PYIajNoPxskbNjEvodd LUXqWSurik3NY884ePRZEvf5RyDqnNQ= X-MC-Unique: 2nFTgxF5OqKkpBM5WV5-Kg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH 2/5] qemu: add virtio-blk-vhost-vdpa capability Date: Tue, 6 Jun 2023 16:11:01 -0500 Message-Id: <20230606211104.1632426-3-jjongsma@redhat.com> In-Reply-To: <20230606211104.1632426-1-jjongsma@redhat.com> References: <20230606211104.1632426-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1686085882583100008 Content-Type: text/plain; charset="utf-8"; x-default="true" Check whether the qemu binary supports the vdpa block driver. We can't rely simply on the existence of the virtio-blk-vhost-vdpa block driver since the first releases of qemu didn't support fd-passing for this driver. So we have to check for the 'fdset' feature on the driver object. This feature will be present in the qemu 8.1.0 release and was merged to qemu in commit 98b126f5. Signed-off-by: Jonathon Jongsma Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index cf85d42198..11d5ecd622 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -693,6 +693,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "virtio-gpu.blob", /* QEMU_CAPS_VIRTIO_GPU_BLOB */ "rbd-encryption-layering", /* QEMU_CAPS_RBD_ENCRYPTION_LAYER= ING */ "rbd-encryption-luks-any", /* QEMU_CAPS_RBD_ENCRYPTION_LUKS_= ANY */ + "virtio-blk-vhost-vdpa", /* QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOS= T_VDPA */ ); =20 =20 @@ -1560,6 +1561,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "object-add/arg-type/+iothread/thread-pool-max", QEMU_CAPS_IOTHREAD_= THREAD_POOL_MAX }, { "query-migrate/ret-type/blocked-reasons", QEMU_CAPS_MIGRATION_BLOCKE= D_REASONS }, { "screendump/arg-type/format/^png", QEMU_CAPS_SCREENSHOT_FORMAT_PNG }, + { "blockdev-add/arg-type/+virtio-blk-vhost-vdpa/$fdset", QEMU_CAPS_DEV= ICE_VIRTIO_BLK_VHOST_VDPA}, }; =20 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3b55aed07a..6feaa81bbf 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -672,6 +672,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_VIRTIO_GPU_BLOB, /* -device virtio-gpu-*.blob=3D */ QEMU_CAPS_RBD_ENCRYPTION_LAYERING, /* layered encryption support for C= eph RBD */ QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY, /* luks-any (LUKS and LUKS2) encryp= tion format for Ceph RBD */ + QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA, /* -device virtio-blk-vhost-vd= pa */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; --=20 2.40.1