From patchwork Mon Nov 13 01:16:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 743442 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp1403825wrw; Sun, 12 Nov 2023 17:18:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFku5gC+cN4Y4oag1wLXMLPrL5J/ggLrHoMlHojXE9xgmYNwkx+zeJZBtPHv/MDHH3+xQkT X-Received: by 2002:a25:4641:0:b0:d9b:9f55:b62d with SMTP id t62-20020a254641000000b00d9b9f55b62dmr4206329yba.61.1699838283528; 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=VHG/OljWLyD34ojCUWk9SRGnY8BZIfHeiAuciTHsALGrlQFCtl/4jKyBlgDpzePD0b rUzpdOdD3BSRtvTC2Hj83ZM5dMHDHI2Cyq6jeFRGr9f9A6bVF4NWt0muG066kOX6z3E+ eOIt5CQbj8X31iH08A6g38Qzxnc6/w8+nhLOPOe87DQIx8TafbfHp40/MGWAG07Iyff/ /wpPTaNPMKlEGe6DBg3CJUHGssREJyajgZiBHf9cMQdZbsmeUiviueLj1fyaekEWUTJw /Hh38D1OmDFchABzZ9TRoV4T86jSznNNjYrV3EkVdsxbPDpFjudl1Gi3QtrYWTAQRPIH uQYQ== 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=NRil/3WXz3A5t4E/bnd1ZWl6zvRFOIC+1hfQyN4QTSY=; fh=wuGuGNzRUBT5nBQhy+zJrmr0MipRLMv40xtKcfwYGIM=; b=nylcg1f2Lf8pM2TQye9I/a0QDg+gpNOl1bG13nM+Hr2Arx9rz1e+22Vq0vmb2tpGJc m7sEbffG/CcrRHiTqy/DHCOXkFgc3qL7M1XnDm42bhO1363MzrLMXz6LkSNn5IjqktHr cSxp+Tw7ynZU2CcZn0pHDFQjeHtiJR35GduQ+cpJimT6v1BjHSC+qMPMynIi/0u80t5P eA6pBg6kmQj0UObZFZGunlx3LRf0REf7ww611vXxL7y72A+5Py3DFBt5Eg8094EqoC4a lkk8XsJNGArRXXSG28Nb6HfKNspawFW6vfZwLxOORiI30XDzTicHxuMCc2JkbTg1L/xs RbGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eA7E5G9j; 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 ef8-20020a05620a808800b00767b7c58ac4si3795099qkb.605.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=eA7E5G9j; 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 1r2LZk-0000WB-WC; Sun, 12 Nov 2023 20:17:17 -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 1r2LZj-0000Vy-5n for qemu-devel@nongnu.org; Sun, 12 Nov 2023 20:17:15 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2LZh-0003nP-DH for qemu-devel@nongnu.org; Sun, 12 Nov 2023 20:17:14 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6be1bc5aa1cso4056127b3a.3 for ; Sun, 12 Nov 2023 17:17:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699838231; x=1700443031; 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=NRil/3WXz3A5t4E/bnd1ZWl6zvRFOIC+1hfQyN4QTSY=; b=eA7E5G9jZIOFefPpC3ewgqgeITsoWSr5yxzW6li+jBYDWoYZAhD4gXF4YWjkgv10MB xT4Mi7sj1m5VhK46aq1+JnH6kNlgXJri3uEQvCIlDrvl4PjwkCs0IRaQvmK77Dnlwexd g5esdDavdxShYQPJdq/LY+9XiVZJ5IiC/BU1Y+sVh7hE9AWRUurNq/WqvhV3aXVERAag 1dYfprCttCrc9db77gTdZw4o0blr38g7ign5VXnUpS7EjvtTYzNzf+Ngx0qpzRK0VaT+ sCIuekPr2XE2ElEZZcv0fe1OaqkJFpfTdyXZfKId4Q20koJHf7l3Ddmg7beqwSP9YEwU 2V1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699838231; x=1700443031; 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=NRil/3WXz3A5t4E/bnd1ZWl6zvRFOIC+1hfQyN4QTSY=; b=PB+LPiRKMrOZsR+gFemsGOnBt0YQX1/pfGKQFZnLdpDwImm5ku54jPQmjhpdT5P1EW gD9ww2OjhMFP2VzXVCCt/aTJaV8pwMCy18okyMN4r8tLnc2iLCi/gy9gucZB5SAP/4j2 kZ1z3APORo5HcJHj/oiRMOwAi2E6Mq8cQeHo/uYz2K7+/4ngKEsEKr4zNFPOxTZIewTK NNLIOiw3aDcxUt8ZGQJSUYWOjC8ATdzJGvrE+SPIQZ3qIwEEheyB/h65gy7BiZFX+Y+y 1c9vK/7BMBWdlsc48FGWoRvNfhSkI5TAtagKpu3u4A0/RMLY5ZDM87h/setIAv7cxJp/ i4Dw== X-Gm-Message-State: AOJu0YztFw6aDN98lmQwFR/vWJTKVmRSSAG9+V9sRVsWm4ItkeBBET7h qGQxTq0nqTYiJDKGYNeJn9spOOeWmn8Q1Z6AOKljMv42L9s= X-Received: by 2002:a05:6a20:8f1e:b0:186:251f:7338 with SMTP id b30-20020a056a208f1e00b00186251f7338mr5625026pzk.19.1699838231060; Sun, 12 Nov 2023 17:17:11 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Nov 2023 17:17:10 -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 0/4] virtio: Refactor vhost input stub Date: Mon, 13 Nov 2023 09:16:38 +0800 Message-Id: <20231113011642.48176-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::434; envelope-from=leo.yan@linaro.org; helo=mail-pf1-x434.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> 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 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 +- 9 files changed, 126 insertions(+), 145 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