From patchwork Mon Nov 13 19:02:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 743483 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp1793168wrw; Mon, 13 Nov 2023 11:03:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IElI27C0obnijS2gNw0OXXe2whJnP4FgAGp7neK1ONEOsrniRDcX0q/shL+jh1H2GZh5OWS X-Received: by 2002:a67:e092:0:b0:45d:73a7:121 with SMTP id f18-20020a67e092000000b0045d73a70121mr6618736vsl.11.1699902191417; Mon, 13 Nov 2023 11:03:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699902191; cv=none; d=google.com; s=arc-20160816; b=he6DhAIGhlncS35F/KozSCWJNLdhQ9xqvTk6hxFYFJoVSIdQGPC+8ICMefaKwMwrGd DCeqH8EnsK9abZqeUadIQ0hwBEo+owyRPksC2E4w+kmVc32ivHKspFS9ylMK5z9e2QpV Apq7m/wsk4V8IQNHGiB/J4nyXPoLEa+9hH8hCn2vkkOEKK71CfY3PSUsQLyKgdAsYBM3 mO3uwGK+aa+bYmOE3bbMsynD86iujc3PMKkjrTJ/GDQr7IPgCeSWGE1ACD8o61I3Re5o Ac7qeu4RYe/O0sMi8ICsYHR6Ofzxmay82jMVj3koKEQCGbBVb40O4k1fLL8P77TPKpaz LXZg== 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=A9B8vhmBdTNNLSSb0o4IuksifGIRJjzQsowtMpmMZmY=; fh=j5N4gOp3ka1Xsisgn/3FSSHjf2kwoyjMvxSEx5jWFCk=; b=1FfONxAAxUHEKHbonn16Zea1NlDy1V252S2t8VcvVyYy6aPrRTGw1lw5oXau2AqRyg LVXyXyX0Mnn5qH5W4uKagsW1/NQK5qEpcXTPBCJuNdVVooqBS1vi8imPSvKn0ZGvS5L+ znmWgz0wFkA7R8WYqwWcW16zhI4rnP7RiNnlSaCXfkUDOzxQ0wJ6XXFHjkQ4aeiMTPjm Kl5MCokXJv/HyYkyg7+w+J96lyggwzXmfKY11dYSeGgf1UJKcvqckTr/G6euGJQz3z2O tzHxkqoTvZvkymkpH3HIsTqOuVbcNHQ24HnVpywfQR54oc7BtM6eA9zUKuV5ER1TELay LFrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uS6B7ZX1; 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 e24-20020a67eb98000000b0045f3bded6fesi588928vso.515.2023.11.13.11.03.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Nov 2023 11:03:11 -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=uS6B7ZX1; 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 1r2cCf-0002cq-QH; Mon, 13 Nov 2023 14:02:33 -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 1r2cCd-0002ch-Ni for qemu-devel@nongnu.org; Mon, 13 Nov 2023 14:02:31 -0500 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2cCc-0000KP-3I for qemu-devel@nongnu.org; Mon, 13 Nov 2023 14:02:31 -0500 Received: by mail-qt1-x832.google.com with SMTP id d75a77b69052e-421ae930545so23937091cf.0 for ; Mon, 13 Nov 2023 11:02:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699902148; x=1700506948; 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=A9B8vhmBdTNNLSSb0o4IuksifGIRJjzQsowtMpmMZmY=; b=uS6B7ZX1wATZ0HosTRCldPsYYMHIK7pt+Lx+aJjGSA7pYSwpjbQ/Xb1lZU97ZUTi33 dh4pwUApN1vdNOkgqH9DwACelhc8GtazAtGxRlTRhwmavVaVFySOBd3El4x7ey/ZIwRX xhJ8Rz1IchFdDTTYEmq0cDJKjSO7ebQX07NC9bUg02UXr6HVAPQ1LTGo9jtsEZNIfVyZ 9h9iJl6/B8+xBCO62nw1M7D1ChfiFPhOtWk/+SRCEQmMY2cYUmLctAE/mhvXsSP8apPu Jq/5tPZx/8RbnY6fiROHBaCL53yJJ/CAiRjRdWvTPcZL/kpm5yXjFnT9d/qOYkmzlTV8 /qdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699902148; x=1700506948; 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=A9B8vhmBdTNNLSSb0o4IuksifGIRJjzQsowtMpmMZmY=; b=lCeJoeRFIh9MdmLKd1CTuZKuZYa5l5UwhU5HaoawxLZQzvD4s8g3irNMp6dl+BKfiR Gyk9fQKab/iY2TbFUwupp8xSJ2uKb1R825MKwbh2/7kyYmC2v5Yqud5ZLK30trrXIe7F ZeeYrqTdOL6ChFg2pOALPa9fb3Eq3prX1sklIT9gh9UODRdxCCk72wTGGK0P3wez6n+9 EVPQoKxnFYfvd2+ZcpLtCsLkAbEwZjpGXp92tQwObaGn645p8hUVTVmYdWggD/I0LZpp Va8/aCmUcJ99hBLtu+KMGb/zpCUk/vQJeTRBC2ZXzIB+e9zegr8y7PNBoAR4qLvfwcIG ZEbg== X-Gm-Message-State: AOJu0YyskzPgD9cmaaMaWecaqafU+Nq0HM7LsXuSO9/pN3huXcmrED18 DM+waMYGaPKzK/ZxqtKVImHMws+dxUM+qlQBDdB5DITlEvs= X-Received: by 2002:a05:622a:3c7:b0:421:b48d:af02 with SMTP id k7-20020a05622a03c700b00421b48daf02mr12686qtx.19.1699902148345; Mon, 13 Nov 2023 11:02:28 -0800 (PST) Received: from localhost.localdomain ([12.186.190.1]) by smtp.gmail.com with ESMTPSA id kq4-20020ac86184000000b004181c32dcc3sm2124834qtb.16.2023.11.13.11.02.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 11:02:27 -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 v2 0/4] virtio: Refactor vhost input stub Date: Tue, 14 Nov 2023 03:02:07 +0800 Message-Id: <20231113190211.92412-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=leo.yan@linaro.org; helo=mail-qt1-x832.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 v1: - Fixed typo in vhost-user-input.rst. - Updated MAINTAINERS for new added input document and changing folder for vhost-user-input.c. 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/devices/vhost-user-input.rst | 44 ++++++++ docs/system/devices/vhost-user.rst | 2 +- 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 +- 10 files changed, 128 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