From nobody Sun Nov 24 05:34:23 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1726258821; cv=none; d=zohomail.com; s=zohoarc; b=YpEONmDKuN20itH+4hQ+kJ4jyzLEctpc1obYk1dJK4vZPMgvURk4/nRmi6rKy4C6YvjUyoTw/6M4av2roFHQ89+3NPCZAm/a8nRU6PGiMbKZbqX7CsHJhHgUgpGafSKwUcPMtPJ7NIeUmrbCACdHAiQSLPey7Mp9FflmomBbmSg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1726258821; h=Content-Type: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:Message-Id:Reply-To:To; bh=RqY4NlBytX7ch7su6BqSvYG5vlrA13LQHTCrcMuTwk8=; b=nnbpLiC92s1bEuBsR5lZzq3bY1RnPBSb1cMlacbgEhjS6pLfHpnkAHseCZ/pFxf/xEXAc+GdTtxc1aU0ePXwyufbp3oX+yt76w/1cjsJ/2RuqYq/LbGWQ0DN/D2YEF1n9yhCMl8n0kuTJrhmIGJFnVPAyXkpZIYUXnc9RpiKhdw= 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 1726258821320472.100445852112; Fri, 13 Sep 2024 13:20:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spClp-0006xe-W4; Fri, 13 Sep 2024 16:19:58 -0400 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 1sp9Ip-0005eu-KG for qemu-devel@nongnu.org; Fri, 13 Sep 2024 12:37:47 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sp9In-0000gC-TK for qemu-devel@nongnu.org; Fri, 13 Sep 2024 12:37:47 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a8d4093722bso314031166b.0 for ; Fri, 13 Sep 2024 09:37:44 -0700 (PDT) Received: from finn.fritz.box ([2a02:8109:8384:1400:24fe:3d15:e808:f6ec]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25c7286esm878983366b.138.2024.09.13.09.37.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 09:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726245464; x=1726850264; 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=RqY4NlBytX7ch7su6BqSvYG5vlrA13LQHTCrcMuTwk8=; b=HlVg+s+6+ue4spQczaoo0yTLhuJx8+eELhzQO4VA+tVLeSs1YL32ya/76brNaI01K6 mrDpH0J25eiIb0vv0Qfwtkt+VmVQSxYLT1EFJfLtKIG946f5im10ARW8f+6vkdg3L6HX BGi46WC+sYcvgEG37Ohv2X/Px3WALaCYRgzFUhuLqdEdVwzYh9jImnbt8EHlZQL6LWZx 97tk8n1AcA5ijsWh71pH0IcDZT1zdfg/0pbC20SKtwATW24zpYljy0mLa1ieDdbRAopR HkswcaQEe7piX5SZp1ymFkuy88XMYn5M+nMMxx6ldpruDK+oAhFtSQncMM0gYLTm3VfD svpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726245464; x=1726850264; 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=RqY4NlBytX7ch7su6BqSvYG5vlrA13LQHTCrcMuTwk8=; b=PqSA0J0UPSToXcNfrXo9R+yuDRGkAQKGwVVtFo+7AQvTwzax4fG5f2mFQzvLUInchx fyYBbroXU0okkvkBBTgBiq65XnvKYmbNMGoIgzZNMCyWdcXDClTjkDySeKyDNxjqN33B A5HM9bg04eE0mF+/ZTdPlGiS0xGStSiyJdJ4j0siIn+bmstLnaac1AAPvkHDwyChlxT8 E4hYnJ5hz/mZNHVFIn6fAiEc3XkCc9vtSMauiBHZJW0+S3wbnagwRWN7PS5iL03B37SQ bCG4HRP7XRhYSSgULLnJwc7vsZgdPmmbeEBqvctTxIER07bf1s7sKIpfXEXBBy8b7MFW jU0Q== X-Forwarded-Encrypted: i=1; AJvYcCVpRGBnrMe7VzhcQn0Do+aYd3fYlBPHJDqq7W/PyCNA1C2+8vWZGbpE79SBrx5NUtipsvBZvEPADzzb@nongnu.org X-Gm-Message-State: AOJu0YwwdCTPE/+/jAbW+IR9Bci7/XWmfyj0YKtEmO1DGCqAt8DbsWUI PEE43+oGrdSlaTNjDVwSIj6CEOPpTPkqj6vDZL8ZYJK2ekj+WtsNOBNEdA== X-Google-Smtp-Source: AGHT+IHRdH+uAv9Jv9elIjSsOedBtdF7WvEhd/5jA1Ue8fbEjgSUwoTt+m9ok4VyEduOTR5HYcbnZg== X-Received: by 2002:a17:907:1b13:b0:a8a:78bb:1e2 with SMTP id a640c23a62f3a-a90293b15e6mr871125966b.6.1726245463199; Fri, 13 Sep 2024 09:37:43 -0700 (PDT) From: Roman Penyaev To: Cc: Roman Penyaev , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 2/2] qemu-options.hx: describe multiplexing of several backend devices Date: Fri, 13 Sep 2024 18:36:36 +0200 Message-Id: <20240913163636.253949-3-r.peniaev@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240913163636.253949-1-r.peniaev@gmail.com> References: <20240913163636.253949-1-r.peniaev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=2a00:1450:4864:20::630; envelope-from=r.peniaev@gmail.com; helo=mail-ej1-x630.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 13 Sep 2024 16:19:54 -0400 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 @gmail.com) X-ZM-MESSAGEID: 1726258822360116600 This adds a few lines describing multiplexer configuration for multiplexing several backend devices with a single frontend device. Signed-off-by: Roman Penyaev Cc: "Marc-Andr=C3=A9 Lureau" Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- qemu-options.hx | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index d94e2cbbaeb1..de1d540b85cd 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3782,7 +3782,7 @@ SRST The general form of a character device option is: =20 ``-chardev backend,id=3Did[,mux=3Don|off][,options]`` - Backend is one of: ``null``, ``socket``, ``udp``, ``msmouse``, + Backend is one of: ``null``, ``socket``, ``udp``, ``msmouse``, ``mux``, ``vc``, ``ringbuf``, ``file``, ``pipe``, ``console``, ``serial``, ``pty``, ``stdio``, ``braille``, ``parallel``, ``spicevmc``, ``spiceport``. The specific backend will determine the @@ -3839,9 +3839,9 @@ The general form of a character device option is: the QEMU monitor, and ``-nographic`` also multiplexes the console and the monitor to stdio. =20 - There is currently no support for multiplexing in the other - direction (where a single QEMU front end takes input and output from - multiple chardevs). + If you need to multiplex in the opposite direction (where one QEMU + interface receives input and output from multiple chardev devices), + please refer to the paragraph below regarding chardev mux configuratio= n. =20 Every backend supports the ``logfile`` option, which supplies the path to a file to record all data transmitted via the backend. The @@ -3941,6 +3941,42 @@ The available backends are: Forward QEMU's emulated msmouse events to the guest. ``msmouse`` does not take any options. =20 +``-chardev mux,id=3Did,chardev=3Dchardev-id[,,chardev-idN]`` + Explicitly create chardev multiplexer with possibility to multiplex + in the opposite direction, where one QEMU interface (frontend device) + receives input and output from multiple chardev backend devices. + + For example the following is a use case of 2 backend devices: text + virtual console ``vc0`` and a socket ``sock0`` connected + to a single virtio hvc console frontend device with multiplexer + ``mux0`` help. Virtual console renders text to an image, which + can be shared over the VNC protocol, in turn socket backend provides + biderectional communication to the virtio hvc console over socket. + The example configuration can be the following: + + :: + + -chardev socket,path=3D/tmp/sock,server=3Don,wait=3Doff,id=3Dsock0= \ + -chardev vc,id=3Dvc0 \ + -chardev mux,id=3Dmux0,chardev=3Dvc0,,sock0 \ + -device virtconsole,chardev=3Dmux0 \ + -vnc 0.0.0.0:0 + + Once QEMU starts VNC client and any TTY emulator can be used to + control a single hvc console: + + :: + + # VNC client + vncviewer :0 + + # TTY emulator + socat unix:connect:/tmp/sock pty,link=3D/tmp/pty & \ + tio /tmp/pty + + Multiplexing of several backend devices with serveral frontend devices + is not supported. + ``-chardev vc,id=3Did[[,width=3Dwidth][,height=3Dheight]][[,cols=3Dcols][,= rows=3Drows]]`` Connect to a QEMU text console. ``vc`` may optionally be given a specific size. --=20 2.34.1