From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LL0fW-00051e-6S for qemu-devel@nongnu.org; Thu, 08 Jan 2009 14:35:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LL0fU-0004zM-BQ for qemu-devel@nongnu.org; Thu, 08 Jan 2009 14:35:49 -0500 Received: from [199.232.76.173] (port=39952 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LL0fU-0004z6-4b for qemu-devel@nongnu.org; Thu, 08 Jan 2009 14:35:48 -0500 Received: from mx1.redhat.com ([66.187.233.31]:50245) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LL0fT-00067W-OG for qemu-devel@nongnu.org; Thu, 08 Jan 2009 14:35:47 -0500 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n08JZkOm019873 for ; Thu, 8 Jan 2009 14:35:46 -0500 Received: from file.fab.redhat.com (file.fab.redhat.com [10.33.63.6]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n08JZkPe012150 for ; Thu, 8 Jan 2009 14:35:46 -0500 Received: from file.fab.redhat.com (localhost.localdomain [127.0.0.1]) by file.fab.redhat.com (8.13.1/8.13.1) with ESMTP id n08JZjeJ004593 for ; Thu, 8 Jan 2009 19:35:45 GMT Received: (from berrange@localhost) by file.fab.redhat.com (8.13.1/8.13.1/Submit) id n08JZjY5004589 for qemu-devel@nongnu.org; Thu, 8 Jan 2009 19:35:45 GMT Date: Thu, 8 Jan 2009 19:35:45 +0000 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH v3 2/5] Add vmchannel command line option. Message-ID: <20090108193545.GC8669@redhat.com> References: <20090108095533.12548.8211.stgit@dhcp-1-237.tlv.redhat.com> <20090108095544.12548.21251.stgit@dhcp-1-237.tlv.redhat.com> <4966521D.1020706@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4966521D.1020706@codemonkey.ws> Reply-To: "Daniel P. Berrange" , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Thu, Jan 08, 2009 at 01:21:01PM -0600, Anthony Liguori wrote: > Gleb Natapov wrote: > >Signed-off-by: Gleb Natapov > >--- > > > > vl.c | 75 > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- > > 1 files changed, 74 insertions(+), 1 deletions(-) > > > >diff --git a/vl.c b/vl.c > >index 959be62..c076375 100644 > >--- a/vl.c > >+++ b/vl.c > >@@ -207,6 +207,13 @@ static int full_screen = 0; > > static int no_frame = 0; > > #endif > > int no_quit = 0; > >+#if defined(CONFIG_SLIRP) > >+#define MAX_VMCHANNEL_DEVICES 4 > >+struct VMChannel { > >+ CharDriverState *hd; > >+ int port; > >+} vmchannel_hds[MAX_VMCHANNEL_DEVICES]; > >+#endif > > CharDriverState *serial_hds[MAX_SERIAL_PORTS]; > > CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; > > #ifdef TARGET_I386 > >@@ -3948,6 +3955,9 @@ static void help(int exitcode) > > "-monitor dev redirect the monitor to char device 'dev'\n" > > "-serial dev redirect the serial port to char device > > 'dev'\n" > > "-parallel dev redirect the parallel port to char device > > 'dev'\n" > >+#if defined(CONFIG_SLIRP) > >+ "-vmchannel di:DI,dev redirect the vmchannel device with device > >id DI, to char device 'dev'\n" > >+#endif > > "-pidfile file Write PID to 'file'\n" > > "-S freeze CPU at startup (use 'c' to start > > execution)\n" > > "-s wait gdb connection to port\n" > >@@ -4062,6 +4072,9 @@ enum { > > QEMU_OPTION_monitor, > > QEMU_OPTION_serial, > > QEMU_OPTION_parallel, > >+#if defined(CONFIG_SLIRP) > >+ QEMU_OPTION_vmchannel, > >+#endif > > > > I think this would make more sense as an option to -net user. For instance: > > -net user,port=1024,chardev=unix:foo.sock > > Not the best syntax, but you get the idea. What do you think? > > It may be useful to use this functionality for other things too. If I'm understanding correctly, the VM channel stuff has a hard requirement for Slirp/user net setup, so could you just go one step further and use the full char device syntax with -net, thus eliminating the redundant 'user:' bit ? -net char:[CHAR-DEV-OPTIONS],port=1024 Or -net vmchan:[CHAR-DEV-OPTIONS],port=1024 Where 'CHAR-DEV-OPTIONS' is any of the stuff valid for -serial/-parallal char device options Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|