From nobody Wed Nov 27 08:26:49 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699838283; cv=none; d=zohomail.com; s=zohoarc; b=BESF6bA4cfmVHekdS5JLbcPl3fz26IWDu2b5QYHaFu7uZZO0Y/Nvag8nsvWyMabK9WwZZoJO1ousKsM7GT/uhOnggAc2sNOFxHPl98ZKcwk+F7akXSu9Bbvc+jPPINwYOMGd72Of5roT7IheVRk7LLTMQbcMDYJ913jT+OlZtuM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699838283; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=z7vncVI87o92pRpzeuD48ta62u1QTVk6AgDWcVuOTqQ=; b=Bh/kWOaDmKI5mxxtj8yYFE8fK7oIyxr/wvveC3OjwBC0CKk/pC1scN/UZAZmqiMqZiGXDAMMiBOPlWFI/+TqskF65JMAak2CkqQ70F7mR7KJ7iAiiL4cxJ5EBkFmHx+BvhCB9jFBksd5Qzn5VyRgiaQKg65s2FgJwO/txIt8NR8= 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 1699838283917860.7434147559989; Sun, 12 Nov 2023 17:18:03 -0800 (PST) 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) 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) 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-Google-Smtp-Source: AGHT+IGn9utev8X7slrdJM5NCZA9QY14S5t/bOpSbdmriokMArv47wFnJDQr3zqfxNVWbhn1GbX9SQ== 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) From: Leo Yan To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , "Michael S . Tsirkin" , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , 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 Content-Transfer-Encoding: quoted-printable 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699838284859100001 Content-Type: text/plain; charset="utf-8" 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 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +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 dae= mon +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=3Dinput.sock \ + --evdev-path=3D/dev/input/event17 + +The QEMU invocation needs to create a chardev socket to communicate with t= he +backend daemon and share memory with the guest over a memfd. + +:: + + host# qemu-system \ + -chardev socket,path=3D/tmp/input.sock,id=3Dmouse0 \ + -device vhost-user-input-pci,chardev=3Dmouse0 \ + -m 4096 \ + -object memory-backend-file,id=3Dmem,size=3D4G,mem-path=3D/dev/shm,s= hare=3Don \ + -numa node,memdev=3Dmem \ + ... 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` --=20 2.34.1