From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqR9h-0004TU-RN for qemu-devel@nongnu.org; Wed, 23 Sep 2009 08:41:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MqR9d-0004Pf-Ku for qemu-devel@nongnu.org; Wed, 23 Sep 2009 08:41:09 -0400 Received: from [199.232.76.173] (port=33382 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MqR9d-0004PH-FH for qemu-devel@nongnu.org; Wed, 23 Sep 2009 08:41:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43575) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MqR9c-0005H7-Qp for qemu-devel@nongnu.org; Wed, 23 Sep 2009 08:41:05 -0400 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.13.8/8.13.8) with ESMTP id n8NCf3eI009061 for ; Wed, 23 Sep 2009 08:41:03 -0400 Date: Wed, 23 Sep 2009 18:10:32 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 3/4] virtio-console: Add support for multiple ports for generic guest-host communication Message-ID: <20090923124032.GA31933@amit-x200.redhat.com> References: <1253636627-12746-1-git-send-email-amit.shah@redhat.com> <1253636627-12746-2-git-send-email-amit.shah@redhat.com> <1253636627-12746-3-git-send-email-amit.shah@redhat.com> <1253636627-12746-4-git-send-email-amit.shah@redhat.com> <4AB9E536.4050001@redhat.com> <20090923094340.GA27483@amit-x200.redhat.com> <4ABA0481.6090603@redhat.com> <20090923115043.GA28088@amit-x200.redhat.com> <4ABA14EF.2050703@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ABA14EF.2050703@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On (Wed) Sep 23 2009 [14:30:39], Gerd Hoffmann wrote: > On 09/23/09 13:50, Amit Shah wrote: >>> VirtConPortConsole (doesn't exist right now it seems ...). >> >> You're actually suggesting to split everything -- a console (in the >> current sense) is a different device and a port (the new vmchannels) are >> different devices. Right? > > Yes, you'll have two devices. > > #1 virtio-console which handles all virtio and is the master of > the portbus. Right; This is in place now. > #2 VirtChanPortConsole, which links the port and the chardev. OK; So based on the last mail the port functionality could be split in a separate file. > With this in place you'll have the current virtio-console functionality. > And on top you can create multiple console ports. > > Then we can go enhance things and add more port drivers: > > #3: One driver which allows external users (i.e. libguestfs) by linking > a chardev too and attach a name tag. That one can probably share > all code except the init function with the console port driver. > #4: the watchdog. > #5: the vnc clipboard bits. > #6: whatever else we might find useful. Right; this model looks good. It wasn't obvious to me the first time you mentioned it (I didn't think adding something like a VirtConPortVnc and some init functions in vnc.c would make any sense -- but actually looks like it would be cleaner to do that). > Ignoring backward-compatibility for now things should go like this: > > -device virtio-console > Creates the portbus master. No ports (yet). > > -device vmport-console,chardev=$dev > Creates a port named 'org.qemu.console' and links it to $dev. OK; that's what I have now, slightly different: -device virtio-console-pci -device virtconport,port=0,chardev=$dev > -device vmport-channel,chardev=$dev,name=$name > Creates a port named $name, links it to $dev, for libguestfs and > other external users. > > -device vmport-watchdog > Creates a port named 'org.qemu.watchdog', start timer when the guest > openes the device, restart the watchdog timer each time the guest > writes something, trigger watchdog action when the timer expires. > Note: No chardev needed here. > > -device vmport-clipboard > vnc clipboard stuff goes here. Probably needs no chardev too. > > For backward-compatibility we'll allways have to create a vmport-console > at port 0, so there will never be a virtio-console without a port. That > is a minor bit we can fixup once the above works fine. ie -virtioconsole ? I'd suggest we just drop that in 0.12. Amit