From patchwork Mon Nov 6 19:15:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 13447332 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7370FC4332F for ; Mon, 6 Nov 2023 19:16:27 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r054S-0007tQ-C0; Mon, 06 Nov 2023 14:15:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r054Q-0007tH-TQ for qemu-devel@nongnu.org; Mon, 06 Nov 2023 14:15:34 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r054G-0005l7-Ax for qemu-devel@nongnu.org; Mon, 06 Nov 2023 14:15:34 -0500 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-32da7ac5c4fso2990413f8f.1 for ; Mon, 06 Nov 2023 11:15:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699298123; x=1699902923; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HDtPrefEanCjuZJYQIPqmOV+61RS08DIeIexVmAEaok=; b=LslB3tCl95kPKdSLdEER2Q848DybVctpn4nPkHC0C1K8akNGnXZAQhUIaoOg4PtnZ3 oCQNI7QxHwDQy2lgOXRXiwBXYO9NgrfgG4gs7A3KZH+y/nhy1bFqpM1rfWxWrpRq0+Ef 6pb516/KjPiBjfHKZ/n3la+GkUU8GNNX3dcNvp4KqR2gpx68qkv9QSNrk3VEtq5UJOeP bucJqVavYRC7eGgrK+fGQ5bc6IMjtvEKoG147QxfaSYQtQR4+w+dPRoWWgQQT+nhEsai RQeuWB3T8BiJXPXGTPq8NTrKao/qxF9qM6LiOjfS/fKuKL2DeYhINPtc7fRnt+dJcW5g T4bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699298123; x=1699902923; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HDtPrefEanCjuZJYQIPqmOV+61RS08DIeIexVmAEaok=; b=t/2N8xwIkF+voOA+87CMXpZ614Z0fvEhzobaO7s9pzrZMNJ+ohOPXERtX9ASCvZwV+ htBMn2jnxZ3MPrupzGondotxPkbj2aIFGEYDMg5jPlZghso7AC3hlKLCiE+/PtDo9aEh YngzgMxmaTjHDTOZNQBiX0+7uDTCVlvz0YVMoH3q3Auhi6DQa/qZGy6Dz9cHoiAYqt0d 6nJmm4fUjnyge6qzclckOoVW7Yve2Q0m73P68o7iDnPzVsancNNIKCZ0E76vuyG2zqMv Fp9ln873CAl7LnFXW5KglZDsFx2PPDMiGX+UB26I26+sb+IepS3P0/XEZccvxudMCJxL pDiA== X-Gm-Message-State: AOJu0YxMNFZzd4p/QllZSEIMrcZk3qi7jA8NdY356R6umxoO098q5sOE JVQtuvELVp05J7GK9qi+f395GA== X-Google-Smtp-Source: AGHT+IGHSsYcGcabLRNX9DqLWtq3bGnh5H7gCpt8A7316y5laA1TQZxCK1wVqzflyk1hNy5udHsVbw== X-Received: by 2002:a5d:6d0f:0:b0:32f:a48f:3658 with SMTP id e15-20020a5d6d0f000000b0032fa48f3658mr15956735wrq.69.1699298122807; Mon, 06 Nov 2023 11:15:22 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i12-20020a5d630c000000b0032dba85ea1bsm347391wru.75.2023.11.06.11.15.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 11:15:19 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B8A056575C; Mon, 6 Nov 2023 19:15:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Jason Wang , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-block@nongnu.org, Markus Armbruster , Mark Cave-Ayland , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Stefan Hajnoczi , Gerd Hoffmann , "Gonglei (Arei)" , "Michael S. Tsirkin" , virtio-fs@redhat.com, Hanna Reitz , Fam Zheng , Raphael Norwitz , Kevin Wolf , Erik Schilling , Viresh Kumar , Mathieu Poirier , Eric Blake , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Eduardo Habkost Subject: [PATCH v6 6/6] docs/system: add a basic enumeration of vhost-user devices Date: Mon, 6 Nov 2023 19:15:15 +0000 Message-Id: <20231106191515.2801863-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231106191515.2801863-1-alex.bennee@linaro.org> References: <20231106191515.2801863-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Make it clear the vhost-user-device is intended for expert use only. Signed-off-by: Alex Bennée Message-Id: <20231009095937.195728-7-alex.bennee@linaro.org> --- v5 - split vhost-user-device out of the table - sort the table alphabetically - add sound and scmi devices v6 - add note re vhost-user-device --- docs/system/devices/vhost-user-rng.rst | 2 + docs/system/devices/vhost-user.rst | 65 +++++++++++++++++++++++++- 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/docs/system/devices/vhost-user-rng.rst b/docs/system/devices/vhost-user-rng.rst index a145d4105c..ead1405326 100644 --- a/docs/system/devices/vhost-user-rng.rst +++ b/docs/system/devices/vhost-user-rng.rst @@ -1,3 +1,5 @@ +.. _vhost_user_rng: + QEMU vhost-user-rng - RNG emulation =================================== diff --git a/docs/system/devices/vhost-user.rst b/docs/system/devices/vhost-user.rst index a80e95a48a..74c8b2f8be 100644 --- a/docs/system/devices/vhost-user.rst +++ b/docs/system/devices/vhost-user.rst @@ -8,13 +8,76 @@ outside of QEMU itself. To do this there are a number of things required. vhost-user device -=================== +================= These are simple stub devices that ensure the VirtIO device is visible to the guest. The code is mostly boilerplate although each device has a ``chardev`` option which specifies the ID of the ``--chardev`` device that connects via a socket to the vhost-user *daemon*. +Each device will have an virtio-mmio and virtio-pci variant. See your +platform details for what sort of virtio bus to use. + +.. list-table:: vhost-user devices + :widths: 20 20 60 + :header-rows: 1 + + * - Device + - Type + - Notes + * - vhost-user-blk + - Block storage + - See contrib/vhost-user-blk + * - vhost-user-fs + - File based storage driver + - See https://gitlab.com/virtio-fs/virtiofsd + * - vhost-user-gpio + - Proxy gpio pins to host + - See https://github.com/rust-vmm/vhost-device + * - vhost-user-gpu + - GPU driver + - See contrib/vhost-user-gpu + * - vhost-user-i2c + - Proxy i2c devices to host + - See https://github.com/rust-vmm/vhost-device + * - vhost-user-input + - Generic input driver + - See contrib/vhost-user-input + * - vhost-user-rng + - Entropy driver + - :ref:`vhost_user_rng` + * - vhost-user-scmi + - System Control and Management Interface + - See https://github.com/rust-vmm/vhost-device + * - vhost-user-snd + - Audio device + - See https://github.com/rust-vmm/vhost-device/staging + * - vhost-user-scsi + - SCSI based storage + - See contrib/vhost-user-scsi + * - vhost-user-vsock + - Socket based communication + - See https://github.com/rust-vmm/vhost-device + +The referenced *daemons* are not exhaustive, any conforming backend +implementing the device and using the vhost-user protocol should work. + +vhost-user-device +^^^^^^^^^^^^^^^^^ + +The vhost-user-device is a generic development device intended for +expert use while developing new backends. The user needs to specify +all the required parameters including: + + - Device ``virtio-id`` + - The ``num_vqs`` it needs and their ``vq_size`` + - The ``config_size`` if needed + +.. note:: + To prevent user confusion you cannot currently instantiate + vhost-user-device without first patching out ``.abstract = true`` in + the ``vhost-user-device.c`` file and rebuilding. + vhost-user daemon =================