qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 2/5] Add vmchannel command line option.


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH v3 2/5] Add vmchannel command line option.
Date: Thu, 08 Jan 2009 13:55:46 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Daniel P. Berrange wrote:
On Thu, Jan 08, 2009 at 01:21:01PM -0600, Anthony Liguori wrote:
Gleb Natapov wrote:
Signed-off-by: Gleb Natapov <address@hidden>
---

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

Yeah, that would be nice too. My main point was moving it from a standalone option to something that was part of net. I'd avoid the name "vmchan" though.

Regards,

Anthony Liguori

Daniel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]