From patchwork Mon Nov 13 01:16:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 743441 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp1403824wrw; Sun, 12 Nov 2023 17:18:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQ83ls+eGp8/AV2kFGBF8d7OlGmkpDR7hVDn1WWz1ELuvGHEhNsMvUYYQ2eWLURhDXy8L9 X-Received: by 2002:ac8:57d0:0:b0:41c:dd14:c32e with SMTP id w16-20020ac857d0000000b0041cdd14c32emr7207148qta.48.1699838283537; Sun, 12 Nov 2023 17:18:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699838283; cv=none; d=google.com; s=arc-20160816; b=TAHKE3Amc300x5HcXyFI+X2ozFK+9eK4TcimRhwNpvIt8P378bR+aaRgkfhf8PxMSg Ks4+EL8nTWo+q3k4gr5hMRMuqcj2FsM8yMOaveFpORI7zaPc6GX2Sz9hd0rU4wSYpQPU ifczK3EYa6jvP5Q+/govz3Wa7JgnnLG3ce1DaA4KqLrDZW/rYcZnUZmZSq0e2OK4hrYz pVTKOXZcSa+LnOavoXENcixbyz/krvFketX81EVzMUPZM6AfMRi/cWrla0avepFgYzLj JE5DIH+hpfyNL8lNglH9cFTAhuB1PDLZ/FHGmGkM4F4VB6iP494+VZwDgT7dqczB/f2C j7Sw== 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=z7vncVI87o92pRpzeuD48ta62u1QTVk6AgDWcVuOTqQ=; fh=wuGuGNzRUBT5nBQhy+zJrmr0MipRLMv40xtKcfwYGIM=; b=fJ0l3S7YjX7xyFRr6dLJwfdl59ZalwYwyTCtf882Imkyq7yigxrh4ZVXOOkn+ywVjk gOxc8DyvfXZ6KpJM7+7GgBO0NccOxn0auQ6gGEWn2gOJrT5jfktahrsbZQt0yOl4BOJ6 X2TejVLF5lgoYheu0BNApDeUDDx6Txn2nGbxhlFw0NyPD9/n41K2mEDsWxkoYeHlb5/G 2FxVV8I4eNaFZwDdUA9IuXxPGEgxJni/bAGod3Yw7XDspJKQIxW/KCKv3aweXJjpBPDO pQinc9nC+12Iq6vyYiBzBmvRaCUYBXGwiTda5GGFG5Os0ryeqJRKw8cmiodJtr0fGnIN kHiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EU4wuJco; 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 y7-20020a05622a004700b00417b2074a0esi3671313qtw.457.2023.11.12.17.18.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 12 Nov 2023 17:18:03 -0800 (PST) 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=EU4wuJco; 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 1r2La3-0000ZN-R0; Sun, 12 Nov 2023 20:17:35 -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 1r2La2-0000Z8-IA for qemu-devel@nongnu.org; Sun, 12 Nov 2023 20:17:34 -0500 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2La0-0003os-SU for qemu-devel@nongnu.org; Sun, 12 Nov 2023 20:17:34 -0500 Received: by mail-ot1-x344.google.com with SMTP id 46e09a7af769-6d2fedd836fso2477266a34.1 for ; Sun, 12 Nov 2023 17:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699838251; x=1700443051; 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=z7vncVI87o92pRpzeuD48ta62u1QTVk6AgDWcVuOTqQ=; b=EU4wuJcoINLWVEy0HKYI5JUZFoeHb0r1BN9gttdCXGsBUpMna1ZI1IHBfp4H6WIxM3 VJtJg6FEIniyQmOzqn7fR98mdAMCVsa0z275srr9p6f/zKCIlqY1n5EYXQPw/s8jXAzX 8jkU2wt2P2zcMu+DjTcDB8sPD/3hC8zT8qOoH1GWDVWO+nUMX6LJ2lfq9oM6q6kVpWma c6+G4+SXGrWe2rnxeRiRa0Ski4hv+1Wve2gGFFD0gZlAYAihzl5l5YSXxia5QrnJ0GGn 4qWmv74I+U8BSmfgUDDKza9ct7CGLGSrHeJiHaIP27B4cQhJ4zv+RO53XCNrQeXtzp9K 7oEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699838251; x=1700443051; 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=z7vncVI87o92pRpzeuD48ta62u1QTVk6AgDWcVuOTqQ=; b=B5c9zb7TIkTGOQVUgfGKEnVWCYzKijtVoKkG+yb4ic4KAbLmvX6W1p4pJTsdYvCbit wxUNr+EW2uBAl/3KbbR9ypV/3VjWxOLukNSaghmlPUgd0k+X0WZXfYc1Vc4hA/7UgsEK aIuOLVy6fOuIbPaHL+ay58MMBVJJP/MwpqQwx94opgDvAMqmz5XoCjcev+DUInqDyMW5 dbDWn49cWFtRSwwiHUzqgHqmKxXlXayh98Lmb2lrb/mcIgKBT2R84yWRTpS5T0+fLXH/ SYwg7F0Rt/UiEFKTQ6r+wrzFnkMTwqnwnhP4qhdsp20Burf88IVJI+6SCHDOiPDfUYo/ AT7Q== X-Gm-Message-State: AOJu0Yzf/3La0H7dXyKW5UcuZPAHhuH+OuYDGuqGIS2CVYNFnpXluaEM TXicXOpl0GICi0e1TjiQokb5ZfH6Z4gQqJzQmNPL+IIn3Cg2bw== X-Received: by 2002:a05:6870:6b89:b0:1e9:919d:83ec with SMTP id ms9-20020a0568706b8900b001e9919d83ecmr8386683oab.28.1699838251367; Sun, 12 Nov 2023 17:17:31 -0800 (PST) Received: from localhost.localdomain ([128.1.74.235]) by smtp.gmail.com with ESMTPSA id r6-20020aa78b86000000b0064f76992905sm2918511pfd.202.2023.11.12.17.17.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 17:17:31 -0800 (PST) From: Leo Yan To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , "Michael S . Tsirkin" , Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Manos Pitsidianakis , Leo Yan Subject: [PATCH v1 2/4] docs/system: Add vhost-user-input documentation Date: Mon, 13 Nov 2023 09:16:40 +0800 Message-Id: <20231113011642.48176-3-leo.yan@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113011642.48176-1-leo.yan@linaro.org> References: <20231113011642.48176-1-leo.yan@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::344; envelope-from=leo.yan@linaro.org; helo=mail-ot1-x344.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This adds basic documentation for vhost-user-input. Signed-off-by: Leo Yan --- docs/system/devices/vhost-user-input.rst | 44 ++++++++++++++++++++++++ docs/system/devices/vhost-user.rst | 2 +- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 docs/system/devices/vhost-user-input.rst diff --git a/docs/system/devices/vhost-user-input.rst b/docs/system/devices/vhost-user-input.rst new file mode 100644 index 0000000000..601282e658 --- /dev/null +++ b/docs/system/devices/vhost-user-input.rst @@ -0,0 +1,44 @@ +.. _vhost_user_rng: + +QEMU vhost-user-input - Input emulation +======================================= + +This document describes the setup and usage of the Virtio input device. +The Virtio input device is a paravirtualized device for input events. + +Description +----------- + +The vhost-user-input device implementation was designed to work with a daemon +polling on input devices and passes input events to the guest. + +QEMU provides a backend implementation in contrib/vhost-user-input. + +Linux kernel support +-------------------- + +Virtio input requires a guest Linux kernel built with the +``CONFIG_VIRTIO_INPUT`` option. + +Examples +-------- + +The backend daemon should be started first: + +:: + + host# vhost-user-input --socket-path=input.sock \ + --evdev-path=/dev/input/event17 + +The QEMU invocation needs to create a chardev socket to communicate with the +backend daemon and share memory with the guest over a memfd. + +:: + + host# qemu-system \ + -chardev socket,path=/tmp/input.sock,id=mouse0 \ + -device vhost-user-input-pci,chardev=mouse0 \ + -m 4096 \ + -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \ + -numa node,memdev=mem \ + ... diff --git a/docs/system/devices/vhost-user.rst b/docs/system/devices/vhost-user.rst index c6afc4836f..75b40f08c6 100644 --- a/docs/system/devices/vhost-user.rst +++ b/docs/system/devices/vhost-user.rst @@ -42,7 +42,7 @@ platform details for what sort of virtio bus to use. - See https://github.com/rust-vmm/vhost-device * - vhost-user-input - Generic input driver - - See contrib/vhost-user-input + - :ref:`vhost_user_input` * - vhost-user-rng - Entropy driver - :ref:`vhost_user_rng`