From patchwork Mon Nov 20 04:37:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 745351 Delivered-To: patch@linaro.org Received: by 2002:a5d:5052:0:b0:32d:baff:b0ca with SMTP id h18csp1100251wrt; Sun, 19 Nov 2023 20:38:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHp1eQ67NDhDCXQfGuolET1STc1QH8wX5Bb5/EYxdgB6RDJx/1PVu3zkGE5uqKjNjPtgGf1 X-Received: by 2002:a05:622a:491:b0:41e:ae5a:2b96 with SMTP id p17-20020a05622a049100b0041eae5a2b96mr8431684qtx.13.1700455137017; Sun, 19 Nov 2023 20:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700455137; cv=none; d=google.com; s=arc-20160816; b=rWwgCl6KP6gz4UzO4KNjj9yXyeBF86dRhhOrL2lW4iPcXSkdOXb+cv51lmZOuKT0+m vnu56ETaa5U9O9WLjNfV7O8617EAysiElQ/d6cayJRsgV6Lwx65GDlUiLFzcPgJS+eJr EuO72rPOSct4pArWqwiFzAz2vPgSqUoS3nKGVxfDy8RIjV1xjZ7qppSVB609B/wyT2G3 IJn+xHCe+eIKMML4VENLyzw77tME0foAvm99M4fJ3wmaVSmKsPyBMirsAak8kR8qKZU1 IMOlcZe9KRooSTAQ6gdi9Ocb+uu4Z8mTjWNdxnOcVWPB08HW96PDUfGkFvMcNmL+WrB1 6CfA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=Inz4zYuY3MEw7YVVxuPhOcABGXtKvBqlQyTklQkUAvk=; fh=j5N4gOp3ka1Xsisgn/3FSSHjf2kwoyjMvxSEx5jWFCk=; b=CE4TWBd6G4ua+uTL+zAhtKV1n8ElQazT7I3u/CF97LzZzDxE4Hp5MpnpFGKZ0MZApA 9YSePSn30x7qL+WqsXEv98023LTsoL10/JK0n+HsV2yY5XS1+vg2udWOoki0mUruUgCe 85skVx9ebJd/+1OPLZKs3K4onhMabJ4ipOBKI8UPVE+XGGd0zMVEVULQ6m9Tw9DOOyh0 ZmxOz9hmB1mqjig3APzWhtHRlwvoQmwbHk+3g7l8tqfdDEAYTz6NiN2lqvaq5ObdjBpz 7MVNks1r+Jg0Qv9P1gxW+GW24NMc+Cqk4nS2riBaHDSwVmoqniMmgZ8d+FBDoHiBl8Ai VwIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YIhTNVxZ; 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 g8-20020ac85808000000b00421c47312a5si6566196qtg.723.2023.11.19.20.38.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 19 Nov 2023 20:38:56 -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=YIhTNVxZ; 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 1r4w2T-0000CO-T0; Sun, 19 Nov 2023 23:37:37 -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 1r4w2S-0000Bq-DZ for qemu-devel@nongnu.org; Sun, 19 Nov 2023 23:37:36 -0500 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r4w2Q-000398-Cy for qemu-devel@nongnu.org; Sun, 19 Nov 2023 23:37:35 -0500 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6cb9dd2ab56so374064b3a.3 for ; Sun, 19 Nov 2023 20:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700455052; x=1701059852; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Inz4zYuY3MEw7YVVxuPhOcABGXtKvBqlQyTklQkUAvk=; b=YIhTNVxZCCoibASHoFtWVNjHV38nfeA7JmEClTAed6S5X6g1sGrkEwM2v5nJ8heQk5 4hq8D4U/C7tZLGqrd7f22jBeBazSbuPegNclAl0Ap47Y13/qzphy9Zm0HRZIj2pVBpqV 4WL9NQ2IhPC0d2dA+qkNh8Lk90YaOfpYmNbcEtCx3yb3RCAa/5yCmW8dkWcOwWN/CERo 3ErMRV8H+0H1oIf21mCmy4yNaxrXZ5TxivbhGAdR/+FdUdVBLOzPOo+V99BOC6pliIMZ IZN2pckI0Z1AMZKqm8PoZkkhhJEunMoboLIFjd1kzL62BSwEQY7lTdUGZj+Hu96eh7nV jh4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700455052; x=1701059852; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Inz4zYuY3MEw7YVVxuPhOcABGXtKvBqlQyTklQkUAvk=; b=t1IBgryVqOKnUckui3FgrO9a5NIKNdVdFt5+/1tfX2c2zyd/wc3MO7isG5QWzK/5JL dgz8SqP94LAkHsoMX0YON4VsJIdAbqlmtlrlbpzXLZK6SJu/yBzBulGpWbDjzGLZGoVe UrFKZ9sL9ibpfjCnvhAxa6uL2PYg1EAOBkP52s/ucT8RYCnbCg8Sj6YLjcguaQb/dynS OH0rOjU2vdOq5BeHpr7PpjFte9k+SzOMXPRtDJ7DSWte7QSOhTkD7zOFW6sWP4ZQLA/6 PiIvSpKzAw4i6bw5AIYLoBjbro97MPGZZNo+jPDF+nrRA0lW/RCBJngKWCMF/Nq7Kqt2 128A== X-Gm-Message-State: AOJu0Yy+nHtLmBj9qV9n8TmfAuSmecLZngBSHcfOX4eLdiQA2W9jEKaQ dzm6SMvO57SpnOXb49o1x7QIUZMxo5pziim5oJL5TCxSJYOS1w== X-Received: by 2002:a05:6a00:c87:b0:6cb:8c5e:6bec with SMTP id a7-20020a056a000c8700b006cb8c5e6becmr1931004pfv.9.1700455052003; Sun, 19 Nov 2023 20:37:32 -0800 (PST) Received: from leoy-yangtze.lan (211-75-219-202.hinet-ip.hinet.net. [211.75.219.202]) by smtp.gmail.com with ESMTPSA id s41-20020a056a0017a900b006926d199fdcsm5035991pfg.190.2023.11.19.20.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Nov 2023 20:37:30 -0800 (PST) From: Leo Yan To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Gerd Hoffmann , "Michael S . Tsirkin" , Manos Pitsidianakis , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Leo Yan Subject: [PATCH v3 0/4] virtio: Refactor vhost input stub Date: Mon, 20 Nov 2023 12:37:17 +0800 Message-Id: <20231120043721.50555-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=leo.yan@linaro.org; helo=mail-pf1-x42f.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 series is to refactor vhost stub vhost-user-input. Since vhost input stub requires set_config() callback for communication event configurations between the backend and the guest, patch 01 is a preparison for support set_config() callback in vhost-user-base. The patch 02 is to add documentation for vhost-user-input. The patch 03 is to move virtio input stub from the input folder to the virtio folder. The patch 04 derives vhost-user-input from vhost-user-base. We reuse the common code from vhhost-user-base as possible and the input stub is simplized significantly. This patch set has been tested with the backend daemon: # ./build/contrib/vhost-user-input/vhost-user-input \ -p /dev/input/event20 -s /tmp/input.sock The series is based on "[PATCH v8 0/7] virtio: cleanup vhost-user-generic and reduce c&p" which introduces vhost-user-base. Based-on: <20231107180752.3458672-1-alex.bennee@linaro.org> Changes from v2: - Created reference for shared memory object and updated vhost-user-input.rst respectively. (Marc-André) Changes from v1: - Fixed typo in vhost-user-input.rst. - Updated MAINTAINERS for new added input document and changing folder for vhost-user-input.c. (Manos) Leo Yan (4): hw/virtio: Support set_config() callback in vhost-user-base docs/system: Add vhost-user-input documentation hw/virtio: Move vhost-user-input into virtio folder hw/virtio: derive vhost-user-input from vhost-user-base MAINTAINERS | 3 +- docs/system/device-emulation.rst | 1 + docs/system/devices/vhost-user-input.rst | 45 ++++++++ docs/system/devices/vhost-user.rst | 4 +- hw/input/meson.build | 1 - hw/input/vhost-user-input.c | 136 ----------------------- hw/virtio/meson.build | 4 +- hw/virtio/vhost-user-base.c | 17 +++ hw/virtio/vhost-user-input-pci.c | 3 - hw/virtio/vhost-user-input.c | 58 ++++++++++ include/hw/virtio/virtio-input.h | 6 +- 11 files changed, 132 insertions(+), 146 deletions(-) create mode 100644 docs/system/devices/vhost-user-input.rst delete mode 100644 hw/input/vhost-user-input.c create mode 100644 hw/virtio/vhost-user-input.c