From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjVey-0007cg-Su for qemu-devel@nongnu.org; Fri, 14 Dec 2012 08:50:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjVex-0001J4-OS for qemu-devel@nongnu.org; Fri, 14 Dec 2012 08:50:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjVZp-00006y-Uu for qemu-devel@nongnu.org; Fri, 14 Dec 2012 08:45:22 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBEDjL3d012464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Dec 2012 08:45:21 -0500 Message-ID: <50CB2D64.2030408@redhat.com> Date: Fri, 14 Dec 2012 14:45:08 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1355477883-15728-1-git-send-email-kraxel@redhat.com> <1355477883-15728-4-git-send-email-kraxel@redhat.com> <50CB18E1.90706@redhat.com> <50CB272C.5020103@redhat.com> In-Reply-To: <50CB272C.5020103@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] chardev: add hotplug support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Il 14/12/2012 14:18, Gerd Hoffmann ha scritto: > Hi, > >> { 'enum': 'ChardevFileMode', 'data': >> # pty = console under Windows >> # serial = tty under POSIX >> [ 'file', 'pipe', 'parport', 'pty', 'serial' ] } > > Hmm, why this enum? I'd stay close to -chardev, i.e. specify the type > by backend name. Because... >> { 'enum: 'ChardevFileSource', 'data': >> [ 'path', 'fd' ] } > > I guess I'd just create a new backend type for file descriptor passing > instead of fitting that into all the existing ones. ... are you passing a file descriptor for a pipe, a file or a parallel/serial port? (pty and console have no arguments, I misremembered). >> { 'union': 'ChardevBackend', 'data': { > > This union thing is new, isn't it? Yeah, a few months old. > Makes sense to use that indeed. > >> 'socket': 'ChardevSocket', >> 'udp': 'UDPSocketAddress', >> 'file': 'ChardevFile', >> 'null': 'ChardevDummy', >> 'msmouse': 'ChardevDummy', >> 'braille': 'ChardevDummy', >> 'stdio': 'ChardevDummy', >> 'vc': 'ChardevVC', > > I doubt we need them all hotpluggable. True, but: 1) I believe long term it's good to move away from QemuOpts; it's good to provide a complete interface even if all we're doing for now is building QemuOpts out of the struct. 2) most of them have no options and trivial anyway; 3) the complicated ones (socket, file, perhaps udp) are also the useful ones. Paolo