qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Implement "info chardev" command.


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] Implement "info chardev" command.
Date: Wed, 22 Oct 2008 10:20:53 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Anthony Liguori wrote:
> Gerd Hoffmann wrote:
>>   Hi,
>>
>> This patch makes qemu keep track of the character devices in use and
>> implements a "info chardev" monitor command to print a list.
>>   
> 
> Is it better to enumerate all chardevs or to provide info functions for
> each type of chardev (i.e. 'info serial', 'info parallel').  I don't
> have a strong feeling either way.

I did it this way because
 (a) It is easier to implement
 (b) Covers everything, not just serial and parallel.  There are also
     usb serial dongles, and it also lists gdb & monitor.  And in case
     we get more in the future, it is already covered ;)
 (c) I prefer to keep the number of info commands low.

> The only thing I'd suggest about this patch is that if you're going to
> print pty:/dev/pty/3, then you should also support that syntax for
> specifying a pty.  Otherwise, there's a lack of symmetry.

It's not a bug, it's a feature.

First, when allocating a pts, the kernel hands out the first free one.
There simply is no way to specify one, thus I simply can't support a
pty:/dev/pts/$nr syntax on the command line.

Second, I think even for other types it would be useful to support this
asymmetric syntax.  Allow "unix:" without specifying a path, then have
qemu allocate a random one in $TMPDIR and report the path via monitor.
Likewise for tcp ports.  That allows moving the ressource allocation
from the management application into qemu, closing race windows along
the way.  No patches yet though.

Oh, the same thing for vnc ports is still on the todo list too.
Remember the "-vnc :1,to=10" feature discussed a few weeks (months?) ago
on the list?

cheers,
  Gerd






reply via email to

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