From patchwork Thu Oct 19 09:56:10 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: 735530 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1426915wro; Thu, 19 Oct 2023 02:57:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmcPPfhtDp943cbYifjf/7zgCbINtDrlsAS8DukZZ4geAS4MPwc8VliUBxgKJyDNjW47a8 X-Received: by 2002:a05:6214:cae:b0:66d:1a20:f278 with SMTP id s14-20020a0562140cae00b0066d1a20f278mr1913942qvs.29.1697709457853; Thu, 19 Oct 2023 02:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697709457; cv=none; d=google.com; s=arc-20160816; b=brlav3j08MW/6bumt9rnIAPFt9zO5D5YXaDOtCtRM8UDnzevnyyEu5IcIqPJXDyrjW nvqhPVncPuzGwC+X7Um0Fk97XlmshQP6InGQvwXgLm8/ocAkxgTKS7U9duHE44yFv+mW p7SB7D1Uv5NRjpeocw8q/F+wuHjkfp7HgKPsj2/T6516++/14GL9BoNZoYja6CJHtT39 WpGbeVVdGH2/7+lMfi0VOZyZDmqB3uG/NxI0WgsUOKMaOGPhKXxqV3F2+u0v41yaO1oO Mbxna//lBgZb/XjgWmltszn6WYAe1a1CboYp2/uEeORPUuYrHSjFFBVlsBpyCrPeQBs2 sQfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Nl4oCt66DltFJde5FyDlUuqmws3N7dpBwF8Ew9PpHYQ=; fh=1w790CBgLcLdIkDw35JqGhdtBYTwXI0w98QYpcKDX3M=; b=rKpePteAj4waKftQt/7mMmHsNpkhMG078qVdc0oG/mDOpw58bwW7teBHdRWm4/GM6v i0vmdqqkZ55CoUMEWS3bKmfMT+k1l5FHs6zmmpcYV1WG5iozP4RdHCOpZKzp+sU3CNDM UjM9y11+z96Bl5MmtlfgBPsE195u24RWBvNwNILABV2qURdODwoRamHDtQA37BfIlZz9 eR3vUhLN6XhEB+uMUM59SojaUcpEDojbLrzDBRi7ss5HbLhcB2mQ3uZgwd8rMlMLC+eG mx3ZIDqPOtN9nF8kfvuxWjQpm3an9XRcvqEsxp8rBN3UTtEYBqNdPNvMMvVmsOYOsMDS UW+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZLYySVgJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jo17-20020a056214501100b0064c84ce3e14si1326379qvb.72.2023.10.19.02.57.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 02:57:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZLYySVgJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtPlQ-000520-AN; Thu, 19 Oct 2023 05:56:24 -0400 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 1qtPlJ-0004zU-Fr for qemu-devel@nongnu.org; Thu, 19 Oct 2023 05:56:17 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtPlG-0006RM-OP for qemu-devel@nongnu.org; Thu, 19 Oct 2023 05:56:17 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40651a72807so69363625e9.1 for ; Thu, 19 Oct 2023 02:56:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697709373; x=1698314173; 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=Nl4oCt66DltFJde5FyDlUuqmws3N7dpBwF8Ew9PpHYQ=; b=ZLYySVgJrG+1BbhtvReq0RxorsQZkcVrX7RPWFQCXyrrbvOOP+ystxnttNS7ThYJaz Pb2UKsjGauAqr81o4VUzHFMssCVb/pUGPAKhwguAHablwGoiM9RRcP0dnyw4Zrv08g2V 4bmerGUcxLTzV93jfalmQQ7MVd3omkHWCe1dP4bxy0YJsda7Zpj5HWCINTHKSt+6v1Wg ZFIKJN/2SGW9pquV0SxC1F0ZNxSuFj9h8NLhR7JxJSE9TJH1T+DnuvPMriK9yOdY4wAf KpH3ZkdX0ilSzfGS1psutTwHdiGawkeRHghgSPUdYBVN8+iY0LWDma9wKehL1uOvTe/n RHAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697709373; x=1698314173; 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=Nl4oCt66DltFJde5FyDlUuqmws3N7dpBwF8Ew9PpHYQ=; b=uXUciH5odXHz9cVlT9TDNyr+jcoAL0Z75YN0WOVSyFH/FtdJQOFfvtIJuWoSFhpJZK cB6GDJXZivtpFbMSBmT5vWMwETLpdVvMO9KEHhOviTZvpxDw350OL42IBHyV6S+y0PW8 MmKwZJANIoQgckGlQBvP9w5BH/zwSzNPkAUWUjgbTdo++j481hZYGHj/CIKaSVPusgkv oKXMQ1hD6GZIp1nzU6s59hcC0UpWef0bR3Yxr/3HK1PDu3KcQjApKJrsIRDpbSdF4xpS 6t4GTussqyT2In1erqcOBnKBNo7Gs8aKVq+5arRb04xE40jk81im1RYBv4BnvR8WzAQM XNkA== X-Gm-Message-State: AOJu0YxO/3WnfQ9J6eYJuzDfYL288DEMbSYh/44Tk8ih7n35C3LZ425z jwUrMOqAG5HfPZsFCeEa+gO12Q== X-Received: by 2002:a05:600c:4f94:b0:407:7e7a:6017 with SMTP id n20-20020a05600c4f9400b004077e7a6017mr1542361wmq.11.1697709373279; Thu, 19 Oct 2023 02:56:13 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i18-20020a05600c481200b00407b93d8085sm3928988wmo.27.2023.10.19.02.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 02:56:12 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1EF8C1FFC1; Thu, 19 Oct 2023 10:56:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , virtio-fs@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Eduardo Habkost , Fam Zheng , Mark Cave-Ayland , qemu-block@nongnu.org, Stefan Hajnoczi , Gerd Hoffmann , Erik Schilling , "Michael S. Tsirkin" , Hanna Reitz , Eric Blake , Kevin Wolf , Jason Wang , Raphael Norwitz , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Markus Armbruster , Mathieu Poirier , Viresh Kumar , "Gonglei (Arei)" Subject: [PATCH v5 6/6] docs/system: add a basic enumeration of vhost-user devices Date: Thu, 19 Oct 2023 10:56:10 +0100 Message-Id: <20231019095610.2818087-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231019095610.2818087-1-alex.bennee@linaro.org> References: <20231019095610.2818087-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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 --- docs/system/devices/vhost-user-rng.rst | 2 + docs/system/devices/vhost-user.rst | 60 +++++++++++++++++++++++++- 2 files changed, 61 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..3e9fd2eba5 100644 --- a/docs/system/devices/vhost-user.rst +++ b/docs/system/devices/vhost-user.rst @@ -8,13 +8,71 @@ 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 + vhost-user daemon =================