From nobody Sat May 18 21:15:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1653481401; cv=none; d=zohomail.com; s=zohoarc; b=eagbqcoLgAk/IslzJgEu7iqHU0hEwnN5QAfyhjjZ8ShOYLOSQ32h34mVfKk6UWbjQwE4ZANmzkS/v2wnEpJBT9LFl4W8uMdsjH6DfKJ0p8yUbpmMdo3/x+U53is9xDpmoBi/D13oxS59T6j34rX87jnK9ipG5f+sPMQ28lsjBpQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653481401; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=p9mYP7S3yv2EK9zCoKOO8DreVRhE42WQGMkgIG26ydQ=; b=YsgsKOPoWr0bYrKPCIYCvDqaFV6pZjFohAdeZHMGkbDJBxQ7+0M0SIgYys+gAzN0ylMJZCKS4stP40T2dzCQS5qmdCaDtpfiaVcl53U5iwcCJmfVrnLbG7kiXoRwe7Axd0YYeR2KYjdXSfYZVS2Rp38CYAdEVJWxCKKguxiNxFo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1653481401058220.63145142183544; Wed, 25 May 2022 05:23:21 -0700 (PDT) Received: from localhost ([::1]:48730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntq2p-0002MO-6J for importer@patchew.org; Wed, 25 May 2022 08:23:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntpzZ-00087v-7X for qemu-devel@nongnu.org; Wed, 25 May 2022 08:19:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32369) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntpzW-0004TT-CA for qemu-devel@nongnu.org; Wed, 25 May 2022 08:19:55 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-472-JHq7ApyONxyrr0CsrSl0MQ-1; Wed, 25 May 2022 08:19:48 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5312A101AA45; Wed, 25 May 2022 12:19:48 +0000 (UTC) Received: from localhost (unknown [10.39.195.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 05FFB2166B29; Wed, 25 May 2022 12:19:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653481191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=p9mYP7S3yv2EK9zCoKOO8DreVRhE42WQGMkgIG26ydQ=; b=P/Obq7tlPEn/VV7jgCtljFp8AtaQmizucrmR68HTFIupu2B++Ee1ttZBOtezf+94/UIMq1 xL8/C33LZPSGNthbxuYvs82Nr1z8z3RFIslazfQJlJURt++UhmN7Sh4QeVxud0gN602B8E mfIFsPKDGhf10VWVtF24VAXog6z6uqs= X-MC-Unique: JHq7ApyONxyrr0CsrSl0MQ-1 From: Stefan Hajnoczi To: qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Stefan Hajnoczi , Xie Yongji Subject: [PATCH] qsd: document vduse-blk exports Date: Wed, 25 May 2022 13:19:47 +0100 Message-Id: <20220525121947.859820-1-stefanha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=170.10.133.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653481403518100001 Content-Type: text/plain; charset="utf-8" Document vduse-blk exports in qemu-storage-daemon --help and the qemu-storage-daemon(1) man page. Based-on: <20220523084611.91-1-xieyongji@bytedance.com> Cc: Xie Yongji Signed-off-by: Stefan Hajnoczi --- docs/tools/qemu-storage-daemon.rst | 21 +++++++++++++++++++++ storage-daemon/qemu-storage-daemon.c | 8 ++++++++ 2 files changed, 29 insertions(+) diff --git a/docs/tools/qemu-storage-daemon.rst b/docs/tools/qemu-storage-d= aemon.rst index 8b97592663..1b461193e7 100644 --- a/docs/tools/qemu-storage-daemon.rst +++ b/docs/tools/qemu-storage-daemon.rst @@ -77,6 +77,7 @@ Standard options: --export [type=3D]vhost-user-blk,id=3D,node-name=3D,addr.= type=3Dunix,addr.path=3D[,writable=3Don|off][,logical-block-si= ze=3D][,num-queues=3D] --export [type=3D]vhost-user-blk,id=3D,node-name=3D,addr.= type=3Dfd,addr.str=3D[,writable=3Don|off][,logical-block-size=3D][,num-queues=3D] --export [type=3D]fuse,id=3D,node-name=3D,mountpoint=3D[,growable=3Don|off][,writable=3Don|off][,allow-other=3Don|off|auto] + --export [type=3D]vduse-blk,id=3D,node-name=3D[,writable= =3Don|off][,num-queues=3D][,queue-size=3D][,logical= -block-size=3D] =20 is a block export definition. ``node-name`` is the block node that shoul= d be exported. ``writable`` determines whether or not the export allows write @@ -110,6 +111,26 @@ Standard options: ``allow-other`` to auto (the default) will try enabling this option, and= on error fall back to disabling it. =20 + The ``vduse-blk`` export type uses the ``id`` as the VDUSE device name. + ``num-queues`` sets the number of virtqueues (the default is 1). + ``queue-size`` sets the virtqueue descriptor table size (the default is = 256). + + The instantiated VDUSE device must then be added to the vDPA bus using t= he + vdpa(8) command from the iproute2 project:: + + # vdpa dev add mgmtdev vduse + + The device can be removed from the vDPA bus later as follows:: + + # vdpa dev del + + For more information about attaching vDPA devices to the host with + virtio_vdpa.ko or attaching them to guests with vhost_vdpa.ko, see + https://vdpa-dev.gitlab.io/. + + For more information about VDUSE, see + https://docs.kernel.org/userspace-api/vduse.html. + .. option:: --monitor MONITORDEF =20 is a QMP monitor definition. See the :manpage:`qemu(1)` manual page for diff --git a/storage-daemon/qemu-storage-daemon.c b/storage-daemon/qemu-sto= rage-daemon.c index 9b8b17f52e..a6b1383055 100644 --- a/storage-daemon/qemu-storage-daemon.c +++ b/storage-daemon/qemu-storage-daemon.c @@ -120,6 +120,14 @@ static void help(void) " vhost-user-blk device over file descriptor\n" "\n" #endif /* CONFIG_VHOST_USER_BLK_SERVER */ +#ifdef CONFIG_VDUSE_BLK_EXPORT +" --export [type=3D]vduse-blk,id=3D,node-name=3D\n" +" [,writable=3Don|off][,num-queues=3D]\n" +" [,queue-size=3D]\n" +" [,logical-block-size=3D]\n" +" export the specified block node as a vduse-blk\n" +" device using the id as the VDUSE device name\n" +#endif /* CONFIG_VDUSE_BLK_EXPORT */ " --monitor [chardev=3D]name[,mode=3Dcontrol][,pretty[=3Don|off]]\n" " configure a QMP monitor\n" "\n" --=20 2.36.1